Learn R Programming

moveVis (version 0.10.5)

get_frametimes: Get frame times from frames

Description

This function extracts the timestamps associated with each frame of a list of frames created using frames_spatial or frames_graph and returns them as a vector.

Usage

get_frametimes(frames)

Arguments

frames

list, list of frames created using frames_spatial or frames_graph.

Value

A POSIXct vector of timestamps representing the time assoicated with each frame in frames.

Details

moveVis stores the times represented by a frame as an attribute "time" for each ggplot frame.

See Also

frames_spatial frames_graph

Examples

Run this code
# NOT RUN {
library(moveVis)
library(move)

data("move_data")
# align movement
m <- align_move(move_data, res = 4, unit = "mins")

# }
# NOT RUN {
frames <- frames_spatial(m, map_service = "osm", map_type = "watercolor")
frames.ts <- get_frametimes(frames)
print(frames.ts)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab