View source: R/sampleBuilding.R
applyPreprocessing | R Documentation |
Apply a new preprocess to a data.sample object.
applyPreprocessing(
data.sample,
operations = NULL,
RclusTool.env = initParameters(),
reset = TRUE,
preprocessed.only = FALSE
)
data.sample |
sample object. |
operations |
list of data.frames describing all preprocessing operations. |
RclusTool.env |
environment in which all global parameters, raw data and results are stored. |
reset |
boolean : if TRUE (default) the configuration is reset. |
preprocessed.only |
boolean : if TRUE (default) processing are restricted to the "preprocessed" features. |
applyPreprocessing applies a new preprocess to a data.sample object
The data.sample
sample object on which was applied the operations
or NULL if preprocessing operations fail.
loadPreprocessFile
dat <- rbind(matrix(rnorm(150, mean = 2, sd = 0.3), ncol = 3),
matrix(rnorm(150, mean = 4, sd = 0.3), ncol = 3),
matrix(rnorm(150, mean = 6, sd = 0.3), ncol = 3))
colnames(dat) <- c("x","y","z")
tf1 <- tempfile()
write.table(dat, tf1, sep=";", dec=",")
x <- importSample(file.features=tf1, sepFeat=";", decFeat=",")
instr <- rbind(c("select","x","log",""), c("select","y","log",""))
tf2 <- tempfile()
write.table(instr, tf2, sep=",", col.names = FALSE, row.names = FALSE)
operations <- loadPreprocessFile(tf2)
x <- applyPreprocessing(x, operations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.