Long3d: Represent hierarchical longitudinal data in 3D

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Long3d.R

Description

Represent hierarchical longitudinal data in 3D

Usage

1
Long3d(fmla, data, id, ..., col.lines = "grey", lwd.lines = 1)

Arguments

fmla
data
id
...
col.lines
lwd.lines

Details

None yet

Value

None

Author(s)

Georges Monette

See Also

Plot3d, ~~~

Examples

 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)

p3d documentation built on May 2, 2019, 5:25 p.m.