# get the sample definition definition file
cdfpath <- file.path(find.package("TargetSearchData"), "gc-ms-data")
sample.file <- file.path(cdfpath, "samples.txt")
# set a path where the RI files will be created
RIpath <- "."
# import samples
sampleDescription <- ImportSamples(sample.file, CDFpath = cdfpath, RIpath = RIpath)
# change the sample names
sampleNames(sampleDescription) <- paste("Sample", 1:length(sampleDescription), sep = "_")
# change the file paths (relative to the working path)
CDFpath(sampleDescription) <- "my_cdfs/"
RIpath(sampleDescription) <- "my_RIs/"
Run the code above in your browser using DataLab