choice | R Documentation |
choice
lets the user choose some Partition
he wants to export.
choice(object, typeGraph = "bmp")
object |
|
typeGraph |
|
choice
is a function that lets the user see the
Partition
found by kml
.
At first, choice
opens a graphics window (for Linux user, the windows should be explicitly
open using x11(type = "Xlib")
). On the left side, all
the Partition
contain in Object
are ploted by a
number (the number of cluster of the Partition). The level of the
number is proportionnal to a quality criteria (like Calinski &
Harabatz). One Partition
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 Partition
.
From there, choice
offers numerous options :
Change the active Partition
.
Select/unselect a Partition
(the selected
Partition
are surrounded by a circle).
Export all the selected Partition
, then
quit the function choice
.
Change the display (Trajectories alone / quality criterion alone / both)
Change actif criterion.
Sort the Partition according to the actif criterion.
Change the trajectories' style.
Change the means trajectories's style.
Change the symbol size.
Change the number of symbols.
When 'return' is pressed (or 'm' using Linux), the selected Partition
are
exported. Exporting is done in a specific named
objectName-Cx-y
where x is the number of cluster and y is the
order in the sublist. Four files are created
:
Table with two columns. The first is the identifier of each trajectory (idAll); the second holds the cluster's affectation of the trajectory.
Table containing information about the clusteration (percentage of individual in each cluster, various qualities criterion, algorithm used to find the partition and convergence time.)
Graph representing the trajectories. All the parameters set during the visualization (color of the trajectories, symbols used, mean color) are used for the export. Note that the 'typeGraph' argument can be used to export the graph in a format different than 'bmp'.
Graph representing the means trajectories of each clusterss. All the parameters set during the visualization (color of the trajectories, symbols used, mean color) are used for the export.
This four file are created for each selected Partition. In addition, two 'global' graphes are created :
Graph presenting the values of the criterionActifall for all the Partition.
For each cluster's number, the first Partition is considered. This graph presents on a single display the values of all the criterion for each first Partition. It is helpfull to compare the various qualities criterion.
For each selected Partition
, four files are saved, plus two global files.
Overview: kml-package
Classes : ClusterLongData
,
Partition
in package longitudinalData
Methods : kml
Plot : plot
### Move to tempdir
wd <- getwd()
setwd(tempdir()); getwd()
### Creation of artificial data
cld1 <- gald(25)
### Clusterisation
kml(cld1,3:5,nbRedrawing=2,toPlot='both')
### Selection of the clustering we want
# (note that "try" is for compatibility with CRAN only,
# you probably can use "choice(cld1)")
try(choice(cld1))
### Go back to current dir
setwd(wd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.