save.tab: Save List of Data Frame or Matrix into CSV File

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/mt_util.R

Description

Save a list of data frame or matrix into a CSV file

Usage

1
  save.tab(x, filename="temp.csv", firstline="\n")

Arguments

x

A list of data frame or matrix.

filename

A character string for saved file name.

firstline

A string giving some description of the saved file.

Details

This function gives a quick option to save a set of data frame or matrix into a single table file.

Value

No return value, called for side effects.

Author(s)

Wanchang Lin

See Also

write.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
data(abr1)
dat <- preproc(abr1$pos[,200:400], method="log10")  
cls <- factor(abr1$fact$class)

tmp <- dat.sel(dat, cls, choices=c("1","2"))
x   <- tmp[[1]]$dat
y   <- tmp[[1]]$cls

fs.method <- c("fs.anova","fs.rf","fs.rfe")
fs.pars   <- valipars(sampling="cv",niter=10,nreps=5)
fs <- feat.mfs(x, y, fs.method, fs.pars)   ## with resampling
names(fs)
fs <- fs[1:3]

## save consistency of feature selection
filename  <- "fs.csv"
firstline <- paste('\nResults of feature selection', sep='')

save.tab(fs, filename, firstline)

## End(Not run)

mt documentation built on Feb. 2, 2022, 1:07 a.m.

Related to save.tab in mt...