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)
Run the code above in your browser using DataLab