search for: mydatasub

Displaying 1 result from an estimated 1 matches for "mydatasub".

Did you mean: mydatasum
2008 May 16
1
xyplot: subscripts, groups and subset
I have stumbled across something in the Lattice package that is vexing me. Consider the code below: __________________________________________________________ library(lattice) myData <- expand.grid(sub = factor(1:16), time = 1:10) myData$observed <- rnorm(nrow(myData)) myData$fitted <- with(myData, ave(observed, sub, FUN = mean)) myData$event.time <- with(myData, ave(observed, sub,