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'))
## Names of variables are labeled with _x, _y, _z, which we'd like to rename
names(motive_data)
## Now use relabel_viewr_axes() to rename these variables using _length,
## _width, and _height instead
motive_data_relabeled <-
relabel_viewr_axes(motive_data,
tunnel_length = "_z",
tunnel_width = "_x",
tunnel_height = "_y",
real = "_w")
## See the result
names(motive_data_relabeled)
Run the code above in your browser using DataLab