ard_attributes.survey.design {cardx}R Documentation

ARD Attributes

Description

Add variable attributes to an ARD data frame.

Usage

## S3 method for class 'survey.design'
ard_attributes(data, variables = everything(), label = NULL, ...)

Arguments

data

(survey.design)
a design object often created with survey::svydesign().

variables

(tidy-select)
variables to include

label

(named list)
named list of variable labels, e.g. list(cyl = "No. Cylinders"). Default is NULL

...

These dots are for future extensions and must be empty.

Value

an ARD data frame of class 'card'

Examples


data(api, package = "survey")
dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)

ard_attributes(
  data = dclus1,
  variables = c(sname, dname),
  label = list(sname = "School Name", dname = "District Name")
)


[Package cardx version 0.2.0 Index]