gss_get_yr | R Documentation |
Use gss_get_yr()
to get GSS data for a single year from
NORC's GSS website (where it is available as a zipped Stata file)
and put it directly into a tibble.
gss_get_yr(
year = 2022,
url = "https://gss.norc.org/documents/stata/",
fname = "_stata",
ext = "zip",
dest = "data-raw/",
save_file = c("n", "y")
)
year |
The desired GSS survey year, as a number (i.e., not in quotes). Defaults to 2022. |
url |
Location of the file. Defaults to the current NORC URL for Stata files. |
fname |
Non-year filename component. Defaults to '_stata'. Usually should not be changed. |
ext |
File name extension. Defaults to 'zip'. Usually should not be changed. |
dest |
If |
save_file |
Save the data file as well as loading it as an object. Defaults to 'n'. |
A tibble with the requested year's GSS data.
gss80 <- gss_get_yr(1980)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.