svy: create a svy object

Description Usage Arguments Examples

Description

'svy()' is a [tibble()] with one element for each question containing the answers and all metadata in the attributes.

Usage

1
svy(dat = kobo_data(), form = kobo_form(), group = NULL)

Arguments

dat

a tibble containing the raw data as returned by 'as_tibble()' on odk data as stored in ODK's native json format

form

a list created using [jsonlite::fromJSON()] on ODK's native json format.

group

this is only used when called on a roster within a group.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
use the default functions to retrieve the data from a kobo server
## Not run: 
s <- svy()

## End(Not run)
load a svy from local data:
## Not run: 
s <- svy(node = jsonlite::fromJSON("data/form.json"),
dat = jsonlite::fromJSON("data/data.json"))

## End(Not run)

mlgrm/svyr documentation built on May 13, 2019, 11:08 a.m.