as.Track | R Documentation |
Function as.Track accepts converts x,y coordinates and thier corresponding time/date to an object of class Track. It can also accepts covariates for the corresponding locations, covariates must be a dataframe with some columns and length of each column is equal to length of x,y,t.
as.Track(x,y,t,covariate)
x |
x coordinate. |
y |
y coordinate. |
t |
corresponding time and date of x,y. |
covariate |
additional information. |
An object of class "Track" can be created by some geographical locations and corresponding time/dates. Function as.Track converts locations and dates/times to an object of class "Track". time/date should be from class "POSIXct" "POSIXt". See example below.
An object of class "Track".
Mohammad Mehdi Moradi <moradi@uji.es>
Track, as.POSIXct
x <- runif(10,0,1)
y <- runif(10,0,1)
date <- seq(as.POSIXct("2015-1-1 0:00"), as.POSIXct("2015-1-1 9:00"), by = "hour")
Z <- as.Track(x,y,date)
plot(Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.