Learn R Programming

movementsync (version 0.1.5)

xlim_duration: Get a ggplot2 xlim object based on duration data

Description

Get a ggplot2 xlim object based on duration data

Usage

xlim_duration(object, expr = .data$Tier == "Form")

Value

a 'Duration' object.

Arguments

object

Duration object.

expr

R expression to subset rows.

Examples

Run this code
# \donttest{
r<-get_recording("NIR_ABh_Puriya", fps=25)
m <- get_metre_data(r)
d <- get_duration_annotation_data(r)
autoplot(m)
autoplot(m) + autolayer(d)
v <- get_raw_view(r, "Central", "", "Sitar")
autoplot(v, columns = c("LEar_x", "LEar_y")) + autolayer(d)
autoplot(v, columns = c("LEar_x", "LEar_y")) +
xlim_duration(d, expr = Tier == "FORM" & substr(Comments, 1, 1) == "J") +
autolayer(d, expr = Tier == "FORM" & substr(Comments, 1, 1) == "J")
# }

Run the code above in your browser using DataLab