Saving, Writing and Loading BIFIEdata Objects
save.BIFIEdata.RdThese functions save (save.BIFIEdata), write (write.BIFIEdata)
or load (load.BIFIEdata) objects of class BIFIEdata.
The function load.BIFIEdata.files allows the creation
of BIFIEdata objects by loading separate files of imputed datasets,
replicate weights and a possible indicator dataset.
Usage
save.BIFIEdata(BIFIEdata, name.BIFIEdata, cdata=TRUE, varnames=NULL)
write.BIFIEdata( BIFIEdata, name.BIFIEdata, dir=getwd(), varnames=NULL,
impdata.index=NULL, type="Rdata", ... )
load.BIFIEdata(filename, dir=getwd() )
load.BIFIEdata.files( files.imp, wgt, file.wgtrep, file.ind=NULL,
type="Rdata",varnames=NULL, cdata=TRUE, dir=getwd(), ... )Arguments
- BIFIEdata
Object of class
BIFIEdata- name.BIFIEdata
Name of
BIFIEdataset to be saved- cdata
An optional logical indicating whether the dataset should be saved in a 'compact way'
- varnames
Vector of variable names which should be saved. The default is to use all variables.
- dir
Directory in which data files should be saved. The default is the working directory.
- impdata.index
Vector of indices for selecting imputed datasets
- type
Type of saved data. Options are
Rdata(functionbase::save,csv(functionutils::write.csv),csv2(functionutils::write.csv2),table(functionutils::write.table),sav(functionforeign::read.spssfor reading sav files and functionsjlabelled::write_spssfor writing sav files).- ...
Additional arguments to be passed to
base::save,utils::write.csv,utils::write.csv2,utils::write.table,foreign::read.spss,sjlabelled::write_spss- filename
File name of
BIFIEdataobject- files.imp
Vector of file names of imputed datasets
- wgt
Variable name of case weight
- file.wgtrep
File name for dataset with replicate weights
- file.ind
Optional. File name for dataset with response data indicators
See also
For creating objects of class BIFIEdata see BIFIE.data.