checkFormat {eatGADS}R Documentation

Check and Adjust SPSS Format

Description

Function to check if SPSS format statements are specified correctly in a GADSdat object.

Usage

checkFormat(GADSdat, type = "SPSS", changeFormat = TRUE)

Arguments

GADSdat

GADSdat object imported via eatGADS.

type

If type='other', the function nchar will be used to determine character lengths and decimals are not rounded to 16 decimal places. With type='SPSS' additional width for character variables will be added in order to let SPSS read in lengthy characters correctly and .

changeFormat

If changeFormat=TRUE the GADSdat meta data will be updated otherwise only information will be reported.

Details

The function compares SPSS format statements "format" and actual character length and decimal places of all variables in a GADSdat object and its meta data information. Mismatches are reported and can be automatically adjusted.

Value

Returns a GADSdat object.

Examples

# Change example meta information (create a value label with incorrect missing code)
pisa2 <- checkFormat(pisa)



[Package eatGADS version 1.1.0 Index]