prepare_data: Prepare Data Function

View source: R/prepare_data.R

prepare_dataR Documentation

Prepare Data Function

Description

This function takes a data frame and a vector of variable names to be included and performs several steps to prepare the data for analysis. It adds computed variables, subsets the data to include only specified variables, labels the data, and returns the prepared data frame.

Usage

prepare_data(
  data,
  variables.to.be.included = get_default_variables_to_be_included()
)

Arguments

data

A data frame containing the raw data to be prepared.

variables.to.be.included

A character vector specifying the names of variables to be included in the prepared data. Default is to include the default set of variables returned by get_default_variables_to_be_included.

Value

A prepared data frame with added variables, subsetted columns, and labeled data.

Examples

prepared.data <- prepare_data(data)


martingerdin/rofi documentation built on Dec. 3, 2024, 12:10 a.m.