set_data: Set the data of an aba model

Description Usage Arguments Value Examples

View source: R/aba_utils.R

Description

The raw data will be used to fit all of the statistical models. This data will be processed according to what is specified in the aba stat objects.

Usage

1
set_data(model, data)

Arguments

model

an aba model. The model on which data will be set.

data

dataframe or tibble. The data to set.

Value

An aba model with data set.

Examples

1
2
3
4
5
6
7
8
9
data <- adnimerge %>% dplyr::filter(VISCODE == 'bl')

# set data in the traditional way
model <- aba_model() %>% set_data(data)

# pipe data into an `aba_model()` call to get access to auto-completion on
# variables from RStudio upon further pipes. This is useful for setting
# other specs because it will reduce the chance of typos on variable names.
model <- data %>% aba_model()

aba documentation built on Dec. 17, 2021, 1:06 a.m.