Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nsPublicData
actg
Commits
cff0cf54
Commit
cff0cf54
authored
Jan 21, 2018
by
mabrook
Browse files
changing race to a factor
parent
42ab4960
Changes
2
Hide whitespace changes
Inline
Side-by-side
data-raw/read_data.R
View file @
cff0cf54
...
...
@@ -28,6 +28,10 @@ actg$C2 <- ifelse(actg$delta==0 & actg$drop==0,actg$days,NA) #C2 is time of cens
# Treatment (art) as a factor variable
actg
$
art_f
<-
factor
(
actg
$
art
,
levels
=
c
(
0
,
1
),
labels
=
c
(
"Dual therapy"
,
"Triple therapy"
))
# Race as a factor variable
actg
$
race
<-
with
(
actg
,
hispanic
*
1
+
black
*
2
)
actg
$
race
<-
factor
(
actg
$
race
,
levels
=
c
(
0
,
1
,
2
),
labels
=
c
(
"White"
,
"Black"
,
"Hispanic"
))
# Deleting indicators of outcome and drop-out
actg
$
delta
<-
NULL
actg
$
drop
<-
NULL
...
...
data/actg.rda
View file @
cff0cf54
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment