View source: R/read_cases_to_data.R
read_cases_to_data | R Documentation |
Reads in a case-level SAS or CSV file stored in S3 and aggregates it by a vector of specified variables. Adds a variable called 'count' to the dataset to indicate the number of cases in each variable group.
read_cases_to_data(format, path, varlist)
format |
Format of the dataset in S3 (either "SAS" or "CSV"). NB Case insensitive input. |
path |
Path to file in S3. |
varlist |
A character vector of variables by which to aggregate the data. |
## Not run:
read_cases_to_data("SAS","alpha-test-data/popdata.sas7bdat",c("sex","age","region"))
# returns a tibble with variables sex, age, region and count.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.