create_dataset: Create a dataset

View source: R/create_dataset.R

create_datasetR Documentation

Create a dataset

Description

To be transferred into a separate package for Alan.

Usage

create_dataset(
  data,
  varsX = "",
  varY = "",
  config_code = NULL,
  rename_vars = c(),
  remove_vars = c(),
  subset = "all",
  ylevel = NULL,
  primary_key = NULL,
  verbose = F
)

Arguments

data

Dataframe with X and Y variables.

varsX

Vector of variables to use as predictors.

varY

Variable name to use as the outcome.

config_code

R code to create varsX and varY, which define the variables to use.

rename_vars

named vector, where names are the original names and values are the new names.

remove_vars

vector of strings for variables to remove from varsX

subset

Code to further subset the data.

ylevel

Target level of y if y is a factor variable.

primary_key

Id variable, if any.

verbose

If TRUE display extra output.


ck37/ckTools documentation built on April 29, 2023, 11:47 p.m.