applyPreprocessing: Preprocessing application

Description Usage Arguments Details Value See Also Examples

View source: R/sampleBuilding.R

Description

Apply a new preprocess to a data.sample object.

Usage

1
2
3
4
5
6
7
applyPreprocessing(
  data.sample,
  operations = NULL,
  RclusTool.env = initParameters(),
  reset = TRUE,
  preprocessed.only = FALSE
)

Arguments

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.

Details

applyPreprocessing applies a new preprocess to a data.sample object

Value

The data.sample sample object on which was applied the operations or NULL if preprocessing operations fail.

See Also

loadPreprocessFile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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=",", dir.save=tempdir())

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)

RclusTool documentation built on Feb. 4, 2020, 5:08 p.m.