Learn R Programming

miceadds (version 1.5-0)

load.data: RUtilities: Loading/Reading Data Files using miceadds

Description

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

Usage

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.
type
The type of file in which the data frame or matrix should be loaded. This can be Rdata (for Rbinary format, using load.Rdata2), csv (using
path
Directory from which the dataset should be loaded
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.

See Also

See also load.Rdata for loading Rdata frames. See save.Rdata and save.data for saving/writing Rdata frames.

Examples

Run this code
# load a data frame in the file "data_s3.Rdata" and save this
# as the object "dat.s3"
dat.s3 <- load.data( filename = "data_s3.Rdata" , type = "Rdata" )

Run the code above in your browser using DataLab