Import the required and the optional files, and build a dataset.
importSample(file.features = "", file.meta = "", file.profiles = "",
file.RDS = "", file.config = "", dir.images = "", dir.save = ".",
sepFeat = ",", decFeat = ".", naFeat = c("", "NA"), sepSig = ",",
decSig = ".", naSig = c("", "NA"), headerCSV = TRUE,
RclusTool.env = new.env(), save.to.disk = TRUE, ...)
character vector specifying the csv file containing features data.
character vector specifying the txt file containing metadata.
character vector specifying the csv file containing profiles data.
character vector for a RDS file containing a data.sample object. This file is automatically saved when importing a (csv-)file-features. When both a csv-file-features and a RDS file are given, the last one is ignored.
character vector for the name of the configuration file.
character vector containing the path of images directory.
character vector specifying path of the working directory.
character specifying the field separator for the csv file containing features data.
character specifying the decimal points for the csv file containing features data.
vector containing missing values for the csv file containing features data.
character specifying the field separator for the csv file containing profiles data.
character specifying the decimal point for the csv file containing profiles data.
vector containing missing values for the csv file containing profiles data.
boolean if TRUE (default) the file contains the names of the variables as its first line.
environment in which data and intermediate results are stored.
boolean if TRUE (default) some data files and folders are saved to disk.
parameters adressed to read.csv functions.
data.sample loaded data.sample.
function to import sample from CSV files; sample is preprocessed
# NOT RUN {
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
tf1 <- tempfile()
write.table(dat, tf1, sep=",", dec=".")
metadat <- rbind("First metadata: ...", "Second metadata: ...")
tf2 <- tempfile()
writeLines(metadat, tf2)
x <- importSample(file.features=tf1, file.meta=tf2, dir.save=tempdir())
# }
Run the code above in your browser using DataLab