genCodesFromFile {sdcTable} | R Documentation |
Generate standardized codes needed from a hierarchy-file.
genCodesFromFile(file, hierIndex="@", varname, minimal=FALSE)
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 |
This function generates an output objects similar to the input-hierarchy-file with an additional column specifiying the standardized codes
Manipulated data.
Bernhard Meindl
## 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)