cldsWide: ~ Function: cldsWide ~

Description Usage Arguments Details Value Examples

Description

Turn trajectories in wide format into an object of class Clds.

Usage

1
cldsWide(trajWide, times, id)

Arguments

trajWide

[data.frame] or [matrix]: the trajectories, in wide format (each line is an individual, each column is a specific time measurement).

times

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

id

[vector(factor)] Vector of unique identifiers, one for each trajectories. If id is missing, the first column of the trajWide is turn into a factor and is used as id.

Details

Turn trajectories in wide format into an object of class Clds. If id is missing, the first column of the trajWide is turn into a factor and is used as id. Column 2:ncol(trajWide) are the trajectories. If id is not missing, column 1:ncol(trajWide) are the trajectories.

Value

Object of class Clds-class.

Examples

1
2
3
4
data(ictusShort)
myClds <- cldsWide(ictusShort)
myClds
plotTraj(myClds)

Example output

Loading required package: class
Loading required package: longitudinalData
Loading required package: clv
Loading required package: cluster
Loading required package: rgl
Loading required package: misc3d
Loading required package: kml
Loading required package: lattice

Attaching package: 'kmlShape'

The following object is masked from 'package:longitudinalData':

    distFrechet

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
   ~~~ Class: Clds ~~~ 
 ~ steps :
     - Initial format of the data : Wide 
     - Wide data available        : TRUE 
     - Long data available        : FALSE 
     - Senators available         : FALSE 
     - id reduction     : FALSE 
     - times reduction  : FALSE 
     - Use of kmlShape  : FALSE 

 ~ id :  [1] I-1  I-2  I-3  I-4  I-5  I-6  I-7  I-8  I-9  I-10 ... 

 ~ trajWide = [1374x15](limited to 5x10)
    MMS-1 MMS-2 MMS-3 MMS-4 MMS-5 MMS-6 MMS-7 MMS-8 MMS-9 MMS-10 more
I-1    18    17    16    16    16    17    17    17    17     18  ...
I-2    22    20    22    20    20    19    21    21    20     20  ...
I-3    26    26    26    25    28    27    27    26    27     26  ...
I-4    19    20    19    20    19    18    19    20    18     19  ...
I-5    22    22    21    23    21    23    23    21    21     22  ...
... ...

 ~ times : 1 2 3 4 5 6 7 8 9 10 ...

kmlShape documentation built on May 1, 2019, 7:50 p.m.