process_phase: Process Phase Variable

View source: R/helpers.R

process_phaseR Documentation

Process Phase Variable

Description

This is an internal helper function used by raw_plot and mixed_model_analysis to process the phase variable in the input data frame. It sets the factor levels and labels of the phase variable based on the provided phase_levels and phase_labels parameters.

Usage

process_phase(.df, .phase, phase_levels, phase_labels)

Arguments

.df

A data frame containing the data to be processed. Must contain a column specified by .phase.

.phase

The name of the column in .df that contains the phase variable.

phase_levels

(Optional) A vector of values indicating the order of phase levels. This is used to set the factor levels of the phase variable.

phase_labels

(Optional) A vector of labels corresponding to the phase levels. These labels are used in annotations. If not provided, the phase_levels are used as labels.

Value

The input data frame .df with the phase variable processed as a factor with the specified levels and labels.


scdtb documentation built on Sept. 30, 2024, 9:35 a.m.