Skip to contents

This function uploads control data to the specified database based on the control type. Currently supports uploading for 'dbs_sheet' and 'whole_blood' control types.

Usage

upload_controls(user_data, control_type, database = Sys.getenv("SDB_PATH"))

Arguments

user_data

Data to be uploaded. It should match the expected format for the specified control type.

control_type

The type of control to be uploaded. Valid values are 'dbs_sheet' and 'whole_blood'.

database

The path to the database. Defaults to the system environment variable "SDB_PATH".

Value

NULL. However, the function provides messages to inform the user about the number of uploaded controls or any encountered errors.

Examples

# Assuming you have a data frame called df_dbs_sheet and df_whole_blood:
upload_controls(df_dbs_sheet, control_type = "dbs_sheet")
#> object 'df_dbs_sheet' not found
#> Uploaded 0 DBS Sheet Controls!
upload_controls(df_whole_blood, control_type = "whole_blood")
#> object 'df_whole_blood' not found
#>