Property information for a GSS variable or variables
gss_get_props(varnames = "id", data = gss_doc, props = properties)
The variable or variables you want to see properties for. Can be a character string or a character vector.
The codebook data frame, by default gss_doc
Which properties. Not needed for gss_doc
, but one of properties_1
, properties_2
, or properties_3
when data
is gss_panel_docw
.
A tibble of the properties for each variable
Returns the properties of a GSS variable as given in the codebook, typically the Data Type, Missing Data Codes, and Record/Column location.
# \donttest{
data(gss_doc)
gss_get_props(varnames = "age")
#> # A tibble: 3 × 4
#> variable property value id
#> <chr> <chr> <chr> <chr>
#> 1 age Data type numeric AGE
#> 2 age Missing-data codes 0,98,99 AGE
#> 3 age Record/columns 1/233-234 AGE
gss_get_props(varnames = c("age", "race", "fefam"))
#> # A tibble: 9 × 4
#> variable property value id
#> <chr> <chr> <chr> <chr>
#> 1 age Data type numeric AGE
#> 2 age Missing-data codes 0,98,99 AGE
#> 3 age Record/columns 1/233-234 AGE
#> 4 race Data type numeric RACE
#> 5 race Missing-data code 0 RACE
#> 6 race Record/column 1/298 RACE
#> 7 fefam Data type numeric FEFAM
#> 8 fefam Missing-data codes 0,8,9 FEFAM
#> 9 fefam Record/column 1/1114 FEFAM
# }