"Spectra".getManyCsv(gr.crit = NULL, gr.cols = c("auto"),
freq.unit = "no frequency unit provided",
int.unit = "no intensity unit provided",
descrip = "no description provided",
format = "csv", out.file = "mydata")Spectra will be written to out.file. To retrieve it, use new.name <- loadObject(out.file)."Spectra" object, but they are not assigned a group or color and therefore don't plot, though they do take up space in a plot! I will fix this eventually.groupNcolor.
The matching of gr.crit against the sample file names is done one at a time, in order. This means that the entries in gr.crit must be mutally exclusive. For example, if you have files with names like "Control_1" and "Sample_1" and use gr.crit = c("Control", "Sample") groups will be assigned as you would expect. But, if you have file names like "Control_1_Shade" and "Sample_1_Sun" you can't use gr.crit = c("Control", "Sample", "Sun", "Shade") because each criteria is grepped in order, and the "Sun/Shade" phrases, being last, will form the basis for your groups. Because this is a grep process, you can get around this by using regular expressions in your gr.crit argument to specify the desired groups in a mutually exclusive manner. In this second example, you could use gr.crit = c("Control(.*)Sun", "Control(.*)Shade", "Sample(.*)Sun", "Sample(.*)Shade") to have your groups assigned based upon both phrases in the file names.
getManyCsv acts on the files in the current working directory. These should be .csv files with the first column containing the frequency values and the second column containing the intensity values. The columns should be unlabeled. The frequency column is assumed to be the same in all .csv files. There should be no .csv files in the directory except those containing the data to be processed by getManyCsv, as all .csv files in the directory will be processed.