collectOutcomeVector: Converts a tidy dataframe into a Matrix::sparseMatrix

View source: R/dbplyHelper.R

collectOutcomeVectorR Documentation

Converts a tidy dataframe into a Matrix::sparseMatrix

Description

offloading the majority of processing onto sql if dbplyr tables are involved

Usage

collectOutcomeVector(df, rowVar, outcomeVar, factorise = TRUE, ...)

Arguments

df

- a df

rowVar

- the dataframe columns(s) which define the matrix row, quoted by vars(...) - typically this is the observation id

outcomeVar

- (optional) the dataframe column continaing the outcome

factorise

- convert outcomeVar to a factor (default FALSE)

...

- other parameters passed to as.factor

Value

a dbplyr dataframe containing the grouped function


terminological/tidy-info-stats documentation built on Nov. 19, 2022, 11:23 p.m.