writeDDI {spssDDI}R Documentation

Write a valid DDI 3.0 XML document

Description

writeDDI produces a valid DDI Version 3.0 XML document from readSpssSav output.

Usage

writeDDI(l,spssSavFile,studyunit="ID",maxNumberMissings=100)

Arguments

l readSpssSav output.
spssSavFile Character string: the name of the SPSS System file.
studyunit Character string: a unique string that identifies the study.
maxNumberMissings Number: maximum number of missing values in the missingValue DDI's attribute.

Details

writeDDI generates the following DDI content: Citation, Abstract, UniverseReference, Purpose, LogicalProduct (CategoryScheme, CodeSchemes, VariableScheme), PhysicalDataProduct (including ProprietaryRecordLayout for SPSS), PhysicalInstance.

Value

The function doesn't return a value.

Note

To validate the DDI instance, please enable physicaldataproduct_proprietary:3_0_Beta.

Author(s)

Guido Gay

References

DDI
http://www.ddialliance.org/
PSPP
http://www.gnu.org/software/pspp/
SPSSReader
http://forge.opendatafoundation.org/gf/project/ukda_dext/frs/

Examples

## Not run: 
benchmark<-readSpssSav("benchmarkSpss16.sav")
writeDDI(benchmark,"benchmarkSpss16.sav")

essSample<-readSpssSav("essSample.sav")
sink("essSample.xml")
writeDDI(essSample,"essSample.sav")
sink()

## End(Not run)

[Package spssDDI version 0.1.1 Index]