Description Usage Arguments Details Value Author(s) See Also Examples
Represent hierarchical longitudinal data in 3D
1 |
fmla |
|
data |
|
id |
|
... |
|
col.lines |
|
lwd.lines |
None yet
None
Georges Monette
Plot3d
, ~~~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function( fmla, data, id, ..., col.lines = 'grey', lwd.lines = 1) {
help <- "
OBSOLETE: use Plot3d( ...., groups = id)
Long3d( y ~ x + z | g, data, groups = id)
will join points with the same 'groupid' with lines to
show trajectories for longitudinal data.
This function is still very rudimentary.
"
Plot3d( fmla, data, ...)
lapply( split( 1:nrow(data), data[[id]]), function( ind ) {
dz <- data[ ind,]
fmla <- as.formula(paste( sub("\|","+",as.character(fmla))[c(2,1,3)],collapse =""))
Lines3d( yxz = model.frame( fmla, dz)[,1:3],col = col.lines,
lwd = lwd.lines)
}
)
invisible(NULL)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.