swap_axis: Swap axis suffixes in column names

View source: R/general__functions.R

swap_axisR Documentation

Swap axis suffixes in column names

Description

Swaps column name suffixes, typically used for motion capture axes (e.g., X <-> Z).

Usage

swap_axis(df, axis1, axis2)

Arguments

df

A data frame or tibble with column names ending in axis suffixes.

axis1

A string. First axis suffix to swap (e.g., "X").

axis2

A string. Second axis suffix to swap (e.g., "Z").

Value

A tibble with renamed columns.

Examples

# df <- tibble("LHX" = 1, "LHZ" = 2)
# swap_axis(df, "X", "Z")

steenharsted/mocapr documentation built on June 10, 2025, 11:55 a.m.