Is there an alternative to using %in%dosetimes
for subsetting doserows
in the example below? The reason I want to use something else is because I am adding this part in my R-package example I am developing and doesn't seem to accept the %in%
in the example code!
#Set dose records:
dosetimes <- c(0,12)
#set number of subjects
ID <- 1:2
#Make dataframe: CLCR: is creatinine clearance
df <- expand.grid("ID"=ID,"TIME"=sort(unique(c(seq(0,24,1),dosetimes))),"AMT"=0,"DV"=NA)
doserows <- subset(df, TIME%in%dosetimes)