camr_new_codebook_entry: Create New Codebook Entry

View source: R/R07-Codebook.R

camr_new_codebook_entryR Documentation

Create New Codebook Entry

Description

Function to create a data frame of additional class codebook_entry.

Usage

camr_new_codebook_entry(
  Variable_name = "",
  Category = "",
  Data_type = "",
  Subcategory = "",
  Description = "",
  Values_and_labels = "",
  Inventory = "",
  Units_of_measurement = "",
  Descriptive_summary = "",
  Codes_for_missing_data = "",
  Deidentified = "FALSE",
  Collected_over = "",
  Created_from = "",
  Data_quality_checks = "",
  Notes = ""
)

Arguments

Variable_name

A character string, the column name for the variable of interest.

Category

The label associated with the 3-letter abbreviation for the variable's category (see camr_column_abbreviations).

Data_type

The label associated with the 3-letter abbreviation for the variable's data type (see camr_column_abbreviations).

Subcategory

The label associated with the custom abbreviation for the variable's subcategory (see camr_column_abbreviations).

Description

A character string, a brief human-readable description of what the variable is.

Values_and_labels

A named list of two vectors, (1) content containing the distinct values for the variable, and (2) additional_content containing the label associated with each value in (1).

Inventory

A named list of two vectors, (1) content containing the details for the inventory, scale, or questionnaire, and (2) additional_content containing the label associated with each detail given in (1).

Units_of_measurement

A character string, the units of measurement for the variable.

Descriptive_summary

A named list of two vectors, (1) content containing summary statistics for the variable, and (2) additional_content containing the label associated with each statistic in (1).

Codes_for_missing_data

A character vector, the codes (surrounding by back-ticks) for missing data.

Deidentified

Either FALSE if the variable is not deidentified (i.e., contains potential patient health information) or TRUE otherwise.

Collected_over

A named list of two vectors, (1) content containing distinct values for groups, time points, etc., over which the variable was collected, and (2) additional_content containing the column name associated with the values in (1).

Created_from

A character vector, the original REDCap variables from which the variable was created.

Data_quality_checks

A character string, notes on any data quality checks relevant to the variable.

Notes

A character vector, any additional notes to include in the codebook entry.

Details

The use of commas should be avoided for codebook entries in order to ensure easy conversion to a .csv file.

Value

A data frame of the additional class codebook_entry.

Author(s)

Kevin Potter


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.