"Clds"
~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
.
new("Clds", ...)
or
using the constructor cldsWide
and cldsLong
.steps
:[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.
id
:[vector(factor)]
Unique identifier, one for each trajectories.nbId
:[integer]
Number of trajectories.nbCol
:[integer]
Number of times measurement (if the
trajectories are in wide format).trajWide
:[matrix]
Trajectories in wide
format. Each line is an individual, each column is a specific
time.times
:[vector(numeric)]
Times at which measures
are made.trajLong
:[data.frame]
Trajectories in long
format. The first column hold the identifiers ; in the second are
the times ; the third coutain the values.senators
:[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.mySenator
:[data.frame]
In the fisrt
column are all the individual indentifier. The second hold the
identifier of the senators that represent the individualsenatorsWeight
:[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.clustersSenators
:[factor]
Clusters of each
senators after the used of kmlShape
.clusters
:[factor]
Clusters of each
individual after the used of kmlShape
. The clusters
of an individual is the cluters of its senators.trajMeans
:[data.frame]
Means' trajectories of
each clusters after the use of kmlShape
.data(ictusShort)
cldsWide(ictusShort)
Run the code above in your browser using DataLab