# NOT RUN {
## Find number of non-missing "conc" observations for each Subject
gapply( Phenobarb, FUN = function(x) sum(!is.na(x$conc)) )
# Pinheiro and Bates, p. 127
table( gapply(Quinidine, "conc", function(x) sum(!is.na(x))) )
changeRecords <- gapply( Quinidine, FUN = function(frm)
any(is.na(frm[["conc"]]) & is.na(frm[["dose"]])) )
# }
Run the code above in your browser using DataLab