powered by
Convert RECIST response code
resp_code_transform( data = NULL, response_col = NULL, new_col = response_col, key = c("1" = "Baseline (BL)", "2" = "Not Evaluable (NE)", "3" = "Stable Disease (SD)", "4" = "Partial Response (PR)", "5" = "Complete Response (CR)", "6" = "Progressive Disease (PD)") )
Dataframe.
A dataframe object that includes the column of interest to convert.
A string. The column name of the column to convert.
A string. The new column name of the converted response column. Defaults to original response column name.
A named vector key on how to convert the response IDs.
df <- data.frame(SampleID = c("A","B","C","D","E","F"), Response = c("1","2","3","4","5","6")) resp_code_transform(df,"Response", new_col = "Response_New")
Run the code above in your browser using DataLab