Commit 97a6801d authored by mabrook's avatar mabrook
Browse files

making sex and race factor variables and removing the original variables from the dataset

parent cff0cf54
......@@ -32,9 +32,17 @@ actg$art_f <- factor(actg$art,levels = c(0,1), labels = c("Dual therapy","Triple
actg$race <- with(actg,hispanic*1+black*2)
actg$race <- factor(actg$race,levels = c(0,1,2), labels = c("White","Black", "Hispanic"))
# Sex as a factor variable
actg$sex <- factor(actg$male,levels = c(0,1), labels = c("Female","Male"))
# Deleting indicators of outcome and drop-out
actg$male <- NULL
actg$hispanic <- NULL
actg$black <- NULL
# Save R data set in the actg package
devtools::use_data(actg,overwrite = TRUE)
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment