Skip to contents

This function selects all outcome columns and adds a new column named dynamically based on the grade threshold (e.g., "grade4_ctcae_event").

Usage

add_grade_ctcae_event_column(df, grade_threshold)

Arguments

df

DataFrame containing the data.

grade_threshold

Numeric, the threshold value to compare against.

Value

DataFrame with an additional column "has_gradeX_ctcae_event" where X is the grade threshold.