This function renders an individual frame. It yields the same result as if an individual frame is extracted using default subsetting [[]].

# S3 method for moveVis
[[(x, i, ...)

render_frame(frames, i = length(frames))

Arguments

x

frames as an object of class moveVis.

i

numeric, index number of the frame to be rendered.

...

additional arguments, currently not used.

frames

frames as an object of class moveVis.

Examples


library(moveVis)
library(move)
data("move_data")
data("basemap_data")

r_list <- basemap_data[[1]]
r_times <- basemap_data[[2]]

# align
m <- align_move(m = move_data, res = 4, unit = "mins")
#> Temporal resolution of 4 [mins] is used to align trajectories.

# create frames
frames <- frames_spatial(m, r_list = r_list, r_times = r_times, fade_raster = TRUE)
#> Checking temporal alignment...
#> Processing movement data...
#> Approximated animation duration: ≈ 7.52s at 25 fps for 188 frames
#> Assigning raster maps to frames...

# viewing frames calling this function:
render_frame(frames) # displays the last frame 

render_frame(frames, i = 100) # displays frame 100 


if (FALSE) {
# alternatively, you can simply use `[[` to do this:
frames[[100]] # displays frame 100

}