genCodesFromFile {sdcTable}R Documentation

genCodesFromFile

Description

Generate standardized codes needed from a hierarchy-file.

Usage

genCodesFromFile(file, hierIndex="@", varname, minimal=FALSE) 

Arguments

file path to hierarchy-file.
hierIndex character used to specify different levels in hierarchy-file
varname variable-name to be standardized
minimal if TRUE, all (sub)totals will be removed

Details

This function generates an output objects similar to the input-hierarchy-file with an additional column specifiying the standardized codes

Value

Manipulated data.

Author(s)

Bernhard Meindl

Examples

        ## Not run: 
                ### calculate standardized code from example hierarchy-file
                file <-  paste(searchpaths()[grep("sdcTable", searchpaths())], "/etc/exampleHier.hcr", sep="")
                all.codes <- genCodesFromFile(file=file, hierIndex="@", varname="someVar")
                minimal.codes <- genCodesFromFile(file=file, hierIndex="@", varname="someVar", minimal=TRUE)
                print(str(all.codes))
                codesOrig <- minimal.codes$codesOrig
                codesStandard <- minimal.codes$codesStandard
                levelStructure <- minimal.codes$levelStructure
                print(codesOrig)
                print(codesStandard)
                print(levelStructure)
        
## End(Not run)       

[Package sdcTable version 0.0.8 Index]