tsqTracks: tsqTracks

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Trackstat.R

Description

tsqtracks returns a sequance of time based on a list of tracks (or a single object of class "Track"") and an argument timestamp.

Usage

1

Arguments

X

either an object of class "Track"" or a list of some objects of class "Track"

timestamp

a timestamp to create the time sequence based on it

Details

This creates a sequence of time based on a track or a list of tracks.

Value

An object of class "POSIXct" or "POSIXt".

Author(s)

Mohammad Mehdi Moradi <moradi@uji.es>

See Also

rTrack

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(sp)
library(spacetime)
t0 = as.POSIXct(as.Date("2013-09-30",tz="CET"))
# person A, track 1:
x = c(7,6,5,5,4,3,3)
y = c(7,7,6,5,5,6,7)
n = length(x)
set.seed(131)
t = t0 + cumsum(runif(n) * 60)
require(rgdal)
crs = CRS("+proj=longlat +datum=WGS84") # longlat
stidf = STIDF(SpatialPoints(cbind(x,y),crs), t, data.frame(co2 = rnorm(n)))
A1 = Track(stidf)
tsqTracks(A1,timestamp = "1 sec")

trajectories documentation built on March 16, 2021, 5:09 p.m.