Skip to contents

This function prepares user data, appends study subjects to a database table, and rejoins to get the study_subject_id.

Usage

create_controls_for_batch(
  user_data,
  con,
  density_col,
  study_short_code_col,
  control_col
)

Arguments

user_data

A dataframe containing user data to process.

con

A database connection object.

density_col

Column name in user_data for density value.

study_short_code_col

Name of the column in user_data corresponding to "Batch".

control_col

Name of the column in user-dta correspond to "Control" (system made)

Value

A dataframe with the study_subject_id added.