read_cases_to_data: Read case-level SAS or CSV file from S3 into an aggregated...

View source: R/read_cases_to_data.R

read_cases_to_dataR Documentation

Read case-level SAS or CSV file from S3 into an aggregated dataset

Description

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.

Usage

read_cases_to_data(format, path, varlist)

Arguments

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.

Examples

## 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)

moj-analytical-services/mojrap documentation built on July 30, 2023, 4:43 p.m.