Plot problem (Rstudio)

Dear All,

At the moment, I am trying to use an open access code (link) to process spectroscopy data. The purpose of this code is to suppress the effect of fluorescence. So as output data I'm supposed to have spectra without the effect of fluorescence (An example is available here : Run this example).

I am using Rstudio for the first time. However, I can't see the output data (Plot)

Can someone help me please.

Thank you in advance.

Try this simpler example. Just cut and paste below into the RStudio window, highlight and press CTRL ENTER

library(EMSC)
data(fishoil, package = "EMSC")
Raman      <- fishoil$Raman[, 850:3300]
EMSC.rep   <- EMSC(Raman, degree = 6, reference = Raman[30, ],
                   replicates = fishoil$replicates)
plot(EMSC.rep)

First of all, thank you for your answer. It seems that the code works for you.
As it's the first time for me that I use the Rstudio, I'm a bit lost. Could you please tell me which file did you open first ? Shall I run any file from the code ?
If I could have more details that would be great (we can also discuss in private if you want).
Thank you for your understanding.

So, when you open RStudio freshly it look something like this.

Then create a new script window with CNTR SHIFT N

and cut and paste the example

Highlight it

Hit CTRL ENTER or click on run

And you should see

For your own data, it needs to be imported in place of the fishoil data frame. How to do that depends on its format and where it is located relative to the current directory that RStudio is operating in.

Thank you once again for your help.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.