render_frame: Render an individual frame

View source: R/render_frame.R

[[.moveVisR Documentation

Render an individual frame

Description

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

Usage

## S3 method for class '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")

# create frames
frames <- frames_spatial(m, r_list = r_list, r_times = r_times, fade_raster = TRUE)

# viewing frames calling this function:
render_frame(frames) # displays the last frame 
render_frame(frames, i = 100) # displays frame 100 

## Not run: 
# alternatively, you can simply use `[[` to do this:
frames[[100]] # displays frame 100


## End(Not run)

16EAGLE/moveVis documentation built on March 4, 2024, 1:35 a.m.