load.data: R Utilities: Loading/Reading Data Files using 'miceadds'

Description Usage Arguments Author(s) See Also Examples

Description

This function is a wrapper function for loading or reading data frames or matrices.

Usage

1
load.data( filename , type="Rdata" , path=getwd() , spss.default=TRUE , ...)

Arguments

filename

Name of the data file (matrix or data frame). This can also be a part of the file name and the most recent file is loaded. filename can also be a vector which strings and a file is loaded which contains all the specified strings.

type

The type of file in which the data frame or matrix should be loaded. This can be Rdata (for R binary format, using load.Rdata2), csv (using utils::read.csv2), csv2 (using utils::read.csv), table (using utils::read.table; the dataset must have the file extension dat or txt) or sav (using foreign::read.spss).

path

Directory from which the dataset should be loaded. It can also be set to NULL if the absolute path is already included in filename.

spss.default

Optional logical which is only applied for type="sav" indicating whether the arguments to.data.frame=TRUE and use.value.labels=FALSE are used.

...

Further arguments to be passed to load.Rdata2, read.csv2, read.csv, read.table or foreign::read.spss.

Author(s)

Alexander Robitzsch

See Also

See also load.Rdata for loading R data frames.

See save.Rdata and save.data for saving/writing R data frames.

Examples

1
2
3
4
5
6
## Not run: 
# load a data frame in the file "data_s3.Rdata" and save this
# as the object "dat.s3"
dat.s3 <- miceadds::load.data( filename = "data_s3.Rdata" , type = "Rdata" )

## End(Not run)


Search within the miceadds 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.