View source: R/AddAISSeverityIndicator.R
Adds a variable to the data that indicates if a patient has an abbreviated injury scale (AIS) severity above or equal to a certain cutoff in a certain body region.
1 2 3 4 5 |
study.sample |
Data frame. The study sample. No default. |
severity.variable.name |
Character vector of length 1. The name of the variable with AIS severity data. Defaults to "head_and_neck". |
cutoff |
Numeric vector of length 1. The AIS severity cutoff. Has to be between 1 and 6. Defaults to 2. |
levels |
Character vector of length 2. The levels to use to encode the resulting indicator variable. The first item in the vector should be the level to be used to indicate that the patient had an injury of the specified severity. Defaults to c("Yes", "No"). |
variable.name |
Character vector of length 1. The name of the resulting variable. Defaults to paste0(severity.variable.name, "geq", cutoff), where geq refers to the Latex command greater than or equal to. |
add.as.factor |
Logical vector of length 1. If TRUE the indicator variable is added to the study sample as a factor. If FALSE it is added as character. Defaults to TRUE. |
drop.used.variables |
Logical vector of length 1. If TRUE variables used to calculate the variable is dropped from the sample. Defaults to FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.