plot: ~ Function: plot for Clds ~

Description Usage Arguments Details Examples

Description

plot plot both the trajectories the the clusters' means of an object Clds.

Usage

1
2
## S4 method for signature 'Clds,missing'
plot(x,y,col="darkgrey",lty=1,legend=TRUE,...)

Arguments

x

[Clds]: Object containing the trajectories to plot.

y

Useless. For compatibility only.

col

[character], [integer] or [vector(integer)]: color use for the trajectories. If the special value "clusters" is used, the trajectories will be colored according to their clusters.

lty

[integer] or [vector(integer)]: line type of the trajectories

legend

[logical]: shall the pourcent of individual in each cluster be printed as a legend ?

...

Arguments to be passed to methods. These arguments need to be compatible with plotTraj.

Details

plot plot both the trajectories the the clusters' means of an object Clds. If the option col="clusters" is used, the trajectories will be colored according to their clusters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
### Generating artificial data
nbLignes <- 12
trajH <- matrix(0,nbLignes,10)

 for(i in 1:(nbLignes/3)){
   trajH[i,] <- pnorm(1:10,runif(1,3,8),1)*rnorm(1,10,1)
}
for(i in (nbLignes/3+1):(2*nbLignes/3)){
   trajH[i,] <- dnorm(1:10,runif(1,3,8),1)*rnorm(1,13,1)
}

for(i in (2*nbLignes/3+1):nbLignes){
   trajH[i,] <- pnorm(1:10,runif(1,3,8),1)*rnorm(1,5,0.1)
}

myClds <- cldsWide(data.frame(1:60,trajH))

par(mfrow=c(1,2))
plotTraj(myClds)
kmlShape(myClds,toPlot="none")
plotTraj(myClds)

kmlShape documentation built on May 1, 2019, 7:50 p.m.