Clds-class: ~ Class '"Clds"' ~

Description Objects from the Class Slots Methods Examples


Clds (or ClusterLongDataShape) is a class used to prepared the trajectories that will be cluster by the function kmlShape and to store the result of the clustering. According to the data simplification that the user may perform, it may containt the trajectories in wide format, in long format, the simplified trajectories (called 'senators'), the partition found and the mean's trajectories of the cluster find by kmlShape.

Objects from the Class

Objects can be created by calls of the form new("Clds", ...) or using the constructor cldsWide and cldsLong.



[vector(logical)] summarizes what data are available and the transformation that the data had already undergone. The first value is TRUE if the data has been generated from a data.frame in a wide format. The second is TRUE if the data are available in wide format. The third is TRUE if the data in long format are available. The fourth is TRUE if the function reduceNbId has been used. The fitfh is TRUE if the function reduceNbTimes has been used. The sixth is TRUE if kmlShape has been used.


[vector(factor)] Unique identifier, one for each trajectories.


[integer] Number of trajectories.


[integer] Number of times measurement (if the trajectories are in wide format).


[matrix] Trajectories in wide format. Each line is an individual, each column is a specific time.


[vector(numeric)] Times at which measures are made.


[data.frame] Trajectories in long format. The first column hold the identifiers ; in the second are the times ; the third coutain the values.


[data.frame] The 'senatorsMeans' are the trajectories get by reducing the number of individual (using reduceNbId). The 'senatorShort' are the population after reduction of the number of time (using reduceNbTimes). 'senatorsMeansShort' are the trajectories get by using both. The field 'senators' hold either the 'senatorMeans', the 'senatorShort' or the 'senatorMeansShort', according to the reduction that has been used.


[data.frame] In the fisrt column are all the individual indentifier. The second hold the identifier of the senators that represent the individual


[integer] If the procedure reduceNbId has been used, each senators is the mean of a clusters. His senatorsWeight is the number of individual that are in his clusters. If reduceNbId has not been used (and thus, only reduceNbTimes has been used), each senators has weight 1.


[factor] Clusters of each senators after the used of kmlShape.


[factor] Clusters of each individual after the used of kmlShape. The clusters of an individual is the cluters of its senators.


[data.frame] Means' trajectories of each clusters after the use of kmlShape.



: Get the value of the field asked. Possible values are 'step', 'wideAvailable', 'longAvailable', 'senatorsAvailable', 'reduceId', 'reduceTimes', 'kmlShape', 'nbClusters', 'id', 'nbId', 'nbCol', 'trajWide', 'times', 'trajLong', 'senators', 'mySenator', 'senatorsWeight', 'clustersSenators', 'clusters', 'trajMeans'


: Set the selected field to value.


: Display the object. Since many fields can be empty, it display only the field that ar not empty.



Search within the kmlShape package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.