Learn R Programming

kml (version 1.1.3)

plotAll,ClusterizLongData: ~ Function: plotAll for ClusterizLongData ~

Description

plot the trajectories, the quality's criterions and the subgroups of an object ClusterizLongData on a single graph.

Usage

## S3 method for class 'ClusterizLongData':
plotAll(x, y, print.cal = TRUE, print.traj = TRUE,
        print.sub = FALSE, allCrit = TRUE, nbCriterion = 100, col = 1,
        type = "l", col.mean = "clusters", type.mean = "b", main = "",
        size = 1, ylim = NA,
        col.sub = 1, type.sub = "l", col.mean.sub = "clusters",
        type.mean.sub = "b", main.sub = "", size.sub = 1, ylim.sub = NA,
        ...)

Arguments

x
[ClusterizLongData] Object containing the trajectories to plot.
y
[numeric] or [vector(numeric)] Give the Clusterization to represent. If y is missing, the Clusterization with the highest quality criterion is selected. If y is a number, the first C
print.cal
[logical]: if TRUE, the quality criterion are printed.
print.traj
[logical]: if TRUE, a "main" graph, showing all the trajectories at once, is printed.
print.sub
[logical]: if TRUE, several sub-graphs, each containing a specific cluster of trajetories, are printed.
allCrit
[logical] shall all the quality criterion be display, or only the best one for each clusters' number ?
nbCriterion
[numeric]: give an upper limit to the number of quality criterion to print.
col
[character], [numeric] or vector[numeric]: Specification of the ploting color of the individual trajectories. In addition to the standard possibles values, col="clusters" can be use to color the individual trajectories according to their cl
col.mean
[character], [numeric] or vector[numeric]: Specification of the ploting color of the mean trajectories. In addition to the standard possibles values, col="clusters" can be use to color each mean trajectories according to its clusters.
type
[character]: what type of plot should be drawn for the individual trajectories.
type.mean
[character]: what type of plot should be drawn for the mean trajectories ?
main
[charater]: give the title of the graph.
size
[numeric]: If some point are added on the mean trajectories, size fixe the size of the point.
ylim
[couple(numeric)]: fixe the ylim parameter.
col.sub
[character], [numeric] or vector[numeric]: Specification of the ploting color of the individual trajectories on the sub-groups graph. In addition to the standard possibles values, col="clusters" can be use to color the individual trajectori
type.sub
[character]: what type of plot should be drawn for the individual trajectories on the sub-groups graph.
col.mean.sub
[character], [numeric] or vector[numeric]: Specification of the ploting color of the mean trajectories on the sub-groups graph. In addition to the standard possibles values, col="clusters" can be use to color each mean trajectories accordin
type.mean.sub
[character]: what type of plot should be drawn for the mean trajectories on the sub-groups graph ?
main.sub
[charater]: give the title of the sub-groups graph.
size.sub
[numeric]: If some point are added on the mean trajectories, size fixe the size of the point on the sub-groups graph.
ylim.sub
[couple(numeric)]: fixe the ylim parameter for the sub-groups graph.
...
Graphical parameters to be passed to methods, see plot(LongData) and par for details.

Author(s)

Christophe Genolini PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health INSERM U669 / Maison de Solenn / Paris Contact author :

English translation

Rapha�l Ricaud Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory University of Paris 10 / Nanterre

Details

For every clusterizLongData object, there is three possible graphical representation: quality criterion, all the trajectories at once and trajectories clusters by clusters. This function combine these three graphical output (or only two, or one, accorind to the three arguments print.cal, print.traj and print.sub). Thus every option (like col.mean,...) are duplicate : one is for the main graph (col.mean), the second is for the sub-graphs (col.mean.sub).

References

Article submited Web site: http://christophe.genolini.free.fr/kml

See Also

Overview: kml-package Classes : ClusterizLongData Plot : plot: overview, plot(ClusterizLongData), plotCriterion, plotSubGroups(ClusterizLongData)

Examples

Run this code
##################
### Data construction
dn <- as.cld(gald())
kml(dn,2:5,5)
kml(dn,16,5)
par(ask=TRUE)

### Default ploting
plotAll(dn)
plotAll(dn,legend=FALSE)

### Only the calinski criterion (same effect than plotCalinski(ld))
plotAll(dn,print.cal=TRUE,print.traj=FALSE,print.sub=FALSE)

### Groups and sub-groups
plotAll(dn,print.cal=FALSE,print.traj=TRUE,print.sub=TRUE,legend=FALSE)
plotAll(dn,print.cal=FALSE,print.traj=TRUE,print.sub=TRUE,col="black",type.mean="n",legend=FALSE)

### All at once
plotAll(dn,print.cal=TRUE,print.traj=TRUE,print.sub=TRUE)

### To see the clusterization with only 2 clusters
plotAll(dn,2,print.cal=FALSE,print.traj=TRUE,print.sub=TRUE)

### To see the third clusterization with 16 clusters
plotAll(dn,c(16,3),print.cal=FALSE,type.mean="b",type="n")

par(ask=FALSE)

Run the code above in your browser using DataLab