View source: R/stata-helpers.R
vartab | R Documentation |
Recreate Stata's variable table
vartab(dta, string = NULL, name = alias)
dta |
output from read_dta |
string |
string to search and filter, optional |
name |
Name of the variable for the column of original stata variables |
# example data (what a read_dta tbl would look like)
df <- tibble(id = 1:3, pid = 1:3, age = 1:3)
attr(df[["id"]], "label") <- "Case Identifier"
attr(df[["pid"]], "label") <- "Partisan Identity"
vartab(df)
vartab(df, "identity")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.