kSave: Write out and Save a Tabular File

Description Usage Arguments Examples

Description

A function that both writes a file to table with write.table, and saves it with the same name but a separate file extension.

Usage

1
kSave(x, file, lvl = 1, Rext = ".rda", ...)

Arguments

x

the R object you want to save / write to file

file

the location to write the file to, with extension desired for object written by write.table

lvl

how many extensions do you want to strip from your output file?

Rext

the extension to use for the saved object.

...

optional arguments passed to write.table

Examples

1
2
3
4
5
dat <- data.frame( x=c(1,2,3), y=c('a','b','c') )
kSave( dat, file="dat.txt" )
## the file 'dat.rda' is written as well - let's see if it exists
dat2 <- kLoad( "dat.rda" )
stopifnot( identical(dat, dat2) ) ## TRUE


Search within the Kmisc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.