xytb {m2b} | R Documentation |
xytb class constructor
Description
The methods to build an xytb object (see xytb-class for the class description).
Usage
xytb(object, desc, winsize, idquant, move, ...)
## S4 method for signature 'missing,missing,ANY,ANY,ANY'
xytb(desc = "null xybt object")
## S4 method for signature 'data.frame,character,ANY,ANY,ANY'
xytb(object, desc, winsize,
idquant, move, ...)
## S4 method for signature 'data.frame,character,vector,vector,ANY'
xytb(object, desc, winsize,
idquant, move, ...)
## S4 method for signature 'data.frame,character,vector,vector,vector'
xytb(object,
desc = "unknow track", winsize = seq(3, 13, 2), idquant = seq(0, 1,
0.25), move = c(5, 10), ...)
Arguments
object |
a data frame with 5 columns
| ||||||||||||||||
desc |
vector of character describing the dataset | ||||||||||||||||
winsize |
a numerical vector giving the length of the windows used to calculate moving standard deviation, average, mad and quantile for the speed (v), the distance (dist) and the relative angle (thetarel). | ||||||||||||||||
idquant |
a numerical vector giving the quantiles to be calculated. For example if idquant=c(0,0.25,.5,1), the quantiles at 0% (min), 25% (first quartile), 50% (median) and 100% (max) will be calculated. | ||||||||||||||||
move |
a numerical vector providing the shift used to computed parameters back in time. For example if move=c(5,10,100), the parameters will be shifted backward by 5, 10 and 100 locations. Optional. | ||||||||||||||||
... |
part of the generic definition |
Value
an xytb object
Methods' signature
-
xytb()
: generate an empty xytb object. -
xytb(data.frame,character vector)
: generate an xytb object with track information (only slot desc, xyt and b are computed). -
xytb(data.frame,character vector,numerical vector, numerical vector,numerical vector)
: generate an xytb object with track information (slotsdesc
,xyt
,b
) and derived informationdxyt
andbefdxyt
.dxyt
contains statistical derivatives of speed, distance and relative angle calculated on moving windows given by the winsize parameters. Statistical derivatides are standard deviation, mean, median absolute deviation and quantiles. Quantiles are defined by theidquant
parameters.befdxyt
containsdxyt
values shifted back in time according to themove
parameters.
Author(s)
Laurent Dubroca
Examples
#generate an empty xytb object
xytb()
#generate an xytb object with track information only
#track_CAGA_005 is a dataset
simplexytb<-xytb(track_CAGA_005,"a track")
#generate a complete xytb object with derived (over moving windows of 3, 5
#and 9 points, with quantile at 0, 50 and 100%) and shifted information on 10
#and 100 points
xytb<-xytb(track_CAGA_005,"a track",c(3,5,9),c(0,.5,1),c(10,100))