Skip to content

Instantly share code, notes, and snippets.

@16EAGLE
Created March 7, 2019 13:45
Show Gist options
  • Save 16EAGLE/1afc1c08d0b2e8696aec5d9f39894266 to your computer and use it in GitHub Desktop.
Save 16EAGLE/1afc1c08d0b2e8696aec5d9f39894266 to your computer and use it in GitHub Desktop.
Short moveVis example on how to create a data.frame containing each track coordinate per frame
# this example uses internal functions since there are no user functions yet to do this
library(moveVis)
data("move_data")
m <- align_move(move_data, res = 4, unit = "mins")
# m must be aligned, check (returns an error, if m is not aligned, does nothing, if m is aligned)
moveVis:::.time_conform(m)
# if you are certain, m is the same variable you used with frames_spatial, you can remove line 9
# make some frames
frames <- frames_spatial(m, equidistant = F)
# covnert m to df with frame numbering per coordinate corrsponding to frames
frames.df <- moveVis:::.m2df(m) # (use the same m as you used with frames_spatial)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment