# matplotLong: ~ Function: matplotLong ~ In kmlShape: K-Means for Longitudinal Data using Shape-Respecting Distance

## Description

Plot some longitudinal data in long format.

## Usage

 ```1 2``` ``` matplotLong(trajLong, col = 1:6, lty = 1:5, lwd=1, add = FALSE, main="", xlab="Times",ylab="",pourcent=NA) ```

## Arguments

 `trajLong` [`data.frame`]: trajectories in long format. The `data.frame` has to be (no choice!) in the following format: the first column should be the individual indentifiant. The second should be the times at which the measurement are made. The third one should be the measurement. `col` [`vector(numeric)`] or [`vector(character)`]: vector that define the trajectories' colors. If the length of the vector is one, `col` is duplicated. `lty` [`numeric`]: lines type. `lwd` [`numeric`]: lines width. `add` [`logical`]: shall the function start a new graph (add=FALSE) or add the lines to the current graph (add=TRUE) ? `main` [`character`]: main title. `xlab` [`character`]: x label. `ylab` [`character`]: y label. `pourcent` [`numeric`]: if pourcent is not NA, then a legend is added on the top of the graph. The legend takes the values given by the vecteur `pourcent`.

## Details

Plot some longitudinal data in long format. Only the color and the lines width can be modifid by the user.

A graph.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```### Preparing data g <- function(x)dnorm(x,3)+dnorm(x,7)+x/10 dn <- data.frame(id=rep(1:20,each=101), times=rep((0:100)/10,times=20), traj=rep(g((0:100)/10),20)+rep(runif(20),each=101)+rnorm(20*101,,0.1)) ### matplotLong matplotLong(dn) ### matplotLong with a legend matplotLong(dn,col=2:3,pourcent=c(0.50,0.50)) ```

kmlShape documentation built on May 29, 2017, 10:19 a.m.