parLongData {longitudinalData} | R Documentation |
~ Function: parLongData, parTraj and parMean~
Description
parLongData
, parTraj
and parMean
are constructors for the class
ParLongData
.
Usage
parLongData(type, col, pch, pchPeriod, cex, xlab, ylab)
parTRAJ(type = "l", col = "black", pch = "1",
pchPeriod = 0, cex = 1, xlab = "Time", ylab = "")
parMEAN(type = "b", col = "clusters", pch = "letters",
pchPeriod = 1, cex = 1.2, xlab = "Time", ylab = "")
Arguments
type |
|
col |
|
pch |
|
pchPeriod |
|
cex |
|
xlab |
|
ylab |
|
Details
parLongData
is the basic constructor of the class
ParLongData
.
parTRAJ
create an object with default values for ploting
individual trajectories ;
parMEAN
create an object with default values for ploting mean trajectories.
If col='clusters', pch='letters' or pch='symbol', the object can not be use directly, it should first be prepared using the function expandParLongData.
Value
An object of class ParLongData
Author(s)
Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris
Contact author : <genolini@u-paris10.fr>
English translation
Raphaƫl Ricaud
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre
Examples
##################
### Construction of LongData
time=c(1,2,3,4,8,12,16,20)
id2=1:120
f <- function(id,t)((id-1)%%3-1) * t
g <- function(id,t)(id%%2+1)*t
ld2 <- longData3d(
array(cbind(outer(id2,time,f),outer(id2,time,g))+rnorm(120*8*2,0,3),
dim=c(120,8,2)))
### Example with default value
plotTrajMeans3d(ld2)
plotTrajMeans3d(ld2,parTraj=parTRAJ())
### Example with default value except for the color
plotTrajMeans3d(ld2,parTraj=parTRAJ(col="blue"))