Hello everyone. I am pretty new on R. Right now I am trying to analyse infrared spectra data in R with ChemoSpec package. So first I have to import spectra data , how ever I could not successfully do it. Here is my code:
install.packages("ChemoSpec")
library (ChemoSpec)
install.packages("R.utils")
library(R.utils)
setwd("C:\Users\TuJi\Documents\R\R softare analysis")
getwd()
spec<- matrix2SpectraObject(gr.crit = c("Bghinfected","Bghcontrol", "Bgtinfected","Bgtcontrol",
gr.cols = c("Col12"),
freq.unit = "wavenumber",
int.unit = "Absorbance intensity",
descrip = "powder mildew infection spectra",
in.file = "the path to my data in CSV format",
out.file = "Spec",
chk = FALSE
)
PM_Spetra <- loadObject("Spec.RData")
After run this code, it said:
PM_Spetra <- loadObject("Spec.RData")
Exception: Pathname not found: Spec.RData (no such file in the current working directory)