viewr data into a "tidy" format so that every row corresponds
to the position (and potentially rotation) of a single subject during an
observed frame and time.
The input viewr object; a tibble or data.frame with attribute
Should rows with NAs be dropped? Defaults to
Additional arguments that can be passed to other
The tibble or data.frame that is fed in must have variables that
have subject names and axis names separated by underscores. Axis names must
be one of the following:
position_height. Each of these three dimensions must be present in the
data. Collectively, this means that names like
larry_position_height are acceptable, but
bird01_length are not.
A tibble in "tidy" format which is formatted to have every row
correspond to the position (and potentially rotation) of a single subject
during an observed frame and time. Subjects' names are automatically parsed
from original variable names (e.g. subject1_rotation_width extracts
"subject1" as the subject name) and stored in a
Subjects column in the
Vikram B. Baliga
Other data cleaning functions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
library(pathviewr) ## Import the Motive example data included in the package motive_data <- read_motive_csv(system.file("extdata", "pathviewr_motive_example_data.csv", package = 'pathviewr')) ## First use relabel_viewr_axes() to rename these variables using _length, ## _width, and _height instead motive_data_relabeled <- relabel_viewr_axes(motive_data) ## Now use gather_tunnel_data() to gather colums into tidy format motive_data_gathered <- gather_tunnel_data(motive_data_relabeled) ## Column names reflect the way in which data were reformatted: names(motive_data_gathered)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.