weight_csv: A wrapper for weight_wwc for CSV file input/output

Description Usage Arguments Details Examples

Description

A wrapper for weight_wwc for CSV file input/output

Usage

1
weight_csv(inputfile, outputpath = "./wwcresults.csv", ...)

Arguments

inputfile

A file containing the input survey data. Either a path to a file, a connection, or literal data (either a single string or a raw vector). Files starting with http://, https://, ftp://, or ftps:// will be automatically downloaded, and zipped files wll be uncompressed.

outputpath

Path to write a csv file of the output weighted results. The new file will contain the original survey data with 1 column added, weight, the post-stratification weight for each row in the survey. Default will write a csv to the working directory.

...

Arguments to be passed to weight_wwc, the weighting indicators. See weight_wwc for more details.

Details

See weight_wwc for more details on the weighting algorithm arguments

Examples

1
2
3
tmp <- tempfile() 
weight_csv(system.file("extdata/examplesurvey.csv", package = "WWC"), tmp,
     sex, raceethnicity)

heathermkrause/WWC documentation built on May 17, 2019, 3:20 p.m.