Displaying 1 result from an estimated 1 matches for "suppressidx".
Did you mean:
suppressed
2012 Sep 17
2
Creating missingness in repeated measurement data
Dear R users,
I have the following problems. My dataset (dat) is as follows:
a <- c(1,2,3)
id <- rep(a, c(3,2,3))
stat <- c(1,1,0,1,0,1,1,1)
g <- c(0,0,0,0,0,0,1,0)
stop <- c(1,2,4,2,4,1,1.5,3)
dat <- data.frame(id,stat,g,stop)
I want to creat a new dataset (dat2) with missing values
such that when either g = =1 or stat = =0, the remaining rows for an
individual subject