ImportSamples {TargetSearch}R Documentation

Sample definitions

Description

This function imports a sample list that will be processed from a tab delimited file.

Usage

ImportSamples(sampfile, CDFpath = ".", RIpath = ".", ...)

Arguments

sampfile A character string naming a sample file. See details.
CDFpath A character string naming a directory where the CDF files are located.
RIpath A character string naming a directory where the RI corrected text files are/will be located.
... Other options passed to read.delim function.

Details

The sample file is a tab-delimited text file with at least two columns:

The column names must be exactly those indicated, but the column order doesn't matter. Other columns could be included in that file. They won't be used by the script, but will be included in the sample R object.

Value

A tsSample object.

Author(s)

Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

See Also

ImportLibrary, tsSample

Examples

# 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/"


[Package TargetSearch version 1.0.0 Index]