resp_code_transform {AdverseEvents}R Documentation

Convert RECIST response code

Description

Convert RECIST response code

Usage

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)")
)

Arguments

data

A dataframe object that includes the column of interest to convert.

response_col

A string. The column name of the column to convert.

new_col

A string. The new column name of the converted response column. Defaults to original response column name.

key

A named vector key on how to convert the response IDs.

Value

Dataframe.

Examples

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")


[Package AdverseEvents version 0.0.4 Index]