Description Usage Arguments Value Note Examples
Coercion of Tracks
and TracksCollection
objects
to objects of class MoveStack
.
For further details please see the vignette!
1 2 3 4 5 | ## S4 method for signature 'TracksCollection'
as.MoveStack(obj)
## S4 method for signature 'Tracks'
as.MoveStack(obj)
|
obj |
object of class |
Object of class MoveStack
The method may be used in two ways: as(obj, "MoveStack") or as.MoveStack(obj).
The coercion to MoveStack
objects just works if the package move
or at least the package sp is explicitly loaded.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Load example toy data
load(system.file("extdata","trajaggr_TestData.RData", package = "trajaggr"), verbose = FALSE)
## Example 1: Coerce Tracks to MoveStack
require(move)
move_Trcs_A <- as.MoveStack(Tracks_A)
slot(Tracks_A[1], "data")
class(move_Trcs_A)
slot(move_Trcs_A, "data")[1:6, ]
slot(Tracks_A[2], "time")
slot(move_Trcs_A, "timestamps")[7:11]
##
## Example 2: Coerce TracksCollection to MoveStack
move_TrColl <- as.MoveStack(TrColl)
class(move_TrColl)
dim(TrColl)
length(unique(slot(move_TrColl, "trackId")))
slot(TrColl[2][2], "data")
slot(move_TrColl, "data")[18:21, 1, drop = FALSE]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.