choice {kml}R Documentation

~ function: choice ~

Description

choice lets the user choose some Clusterization he wants to export.

Usage

choice(Object, typeGraph = "bmp")

Arguments

Object [ClusterizLongData]: Object containnig the trajectories and all the clusterizations found by kml from whom the user want to export some Clusterization.
typeGraph [character] for every selected clusterization, choice export some graphes. type set the format that will be used. Possible formats are the one available for savePlot

Details

choice is a function that let the user see the Clusterization found by kml. At first, choice open a graphics window. On the left side are the calinski criterion of all the Clusterization contain in Object. One Clusterization is 'active', it is the one marked by a black dot. On the right side, the trajectories of Object are drawn, according to the active Clusterization.

From there, choice offert numerous option :

Arrow
Change the active Clusterization.
Space
Select/unselect a Clusterization (the selected Clusterization are surrounded by a circle).
Return
Export all the selected Clusterization, then quit the function choice.
'c'
Switch the graphical representation of the Calinski criterions on/off.
'e'
Switch the graphical representation of the trajectories on/off (see plot,ClusterizLongData for details).
'd'
Switch the graphical representation of the trajectories' subgroups on/off (see plotSubGroups,ClusterizLongData for details).
'r'
Change the trajectories color.
'f'
Change the trajectories' subgroups color.
't'
Change the mean trajectories color.
'g'
Change the mean trajectories' subgroups color.
'y'
Change the mean trajectories symbols.
'h'
Change the mean trajectories' subgroups symbols.
'u'
Increase the size off the mean trajectories symbols.
'j'
Increase the size off the mean trajectories subgroups symbols.
'i'
Decrease the size off the mean trajectories symbols.
'k'
Decrease the size off the mean trajectories subgroups symbols.

Note that the letter on the upper line (e,r,t,y,u,i) does concern the main graph, the letter on the lower line (d,f,g,h,j,k) does concern the subgroups. ; the letter on the first column (e,d,c) switch the graphical representation on/off, the second and third columns (r,f,t,g) change the color and the other column (y,h,u,j,i,k) deal with the symbols.

When 'return' is pressed, the selected Clusterization are export. Export is done in in specific folder named objectName-CnumberOfCluster-OrderInTheSublist. Four files are created :

name-Clusters.csv
Table with two column. The first is the identifier off each trajectory ; the second hold the cluster affectation of the trajectory.
name-Detail.csv
Table containig information about the clusterization (the calinski criterion and the percent of individual in each clusters)
name-Traj.ext
Graph (of type 'ext') representing the trajectories. All the parameters set during the visualization (color of the trajectories, symbols used, mean color) are used for the export.
name-SubGroups.ext
Graph (of type 'ext') representing the trajectories subgroups. All the parameters set during the visualization (color of the trajectories, symbols used, mean color) are used for the export.

Value

For each selected Clusterization, a folder containing four files.

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

References

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

See Also

Overview: kml-package
Classes : ClusterizLongData, Clusterization, ArtificialLongData
Methods : kml
Plot : plot: overview, plot(ClusterizLongData), plot(Calinski), plotSubGroups(ClusterizLongData), plotAll(ClusterizLongData)

Examples

### Creation of articficial data
cld1 <- as.cld(gald())

### Clusterisation
kml(cld1,nbRedrawing=3,printCal=TRUE,printTraj=TRUE)

### Selection of the clusterization we want
#     (note that "try" is for compatibility with CRAN only,
#     you probably can use "choice(cld1)")
try(choice(cld1))

[Package kml version 0.9.2 Index]