Description Usage Arguments Value See Also Examples
This function is a simple wrapper that converts a data.frame
into a move
or moveStack
object. Both can be used as inputs to frames_spatial
or frames_graph
.
1 |
df |
data.frame, a data.frame with rows representing observations and columns representing x and y coordinates, time and optionally track IDs, if multiple tracks are contained. |
proj |
projection, character (proj4string) or CRS object, indicating the projection that the coordinates of |
x |
character, name of the column in |
y |
character, name of the column in |
time |
character, name of the column in |
track_id |
character, optional, name of the column in |
data |
data.frame, optional, to add additional data such as path colours (see |
... |
additional arguments passed to |
A move
or moveStack
object.
frames_spatial
frames_graph
subset_move
1 2 3 4 5 6 7 8 9 10 11 | library(moveVis)
library(move)
# load the example data and convert them into a data.frame
data("move_data")
move_df <- methods::as(move_data, "data.frame")
# use df2move to convert the data.frame into a moveStack
df2move(move_df,
proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",
x = "coords.x1", y = "coords.x2", time = "timestamps", track_id = "trackId")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.