get_VM: Calculate vector magnitude

View source: R/AGread_utils.R

get_VMR Documentation

Calculate vector magnitude

Description

Calculate vector magnitude

Usage

get_VM(triaxial, method = c("legacy", "Rcpp"), verbose = FALSE)

get_VM_C(x, y, z)

Arguments

triaxial

a dataframe of triaxial data on which to calculate vector magnitude

method

which method to use, either legacy (default, for backwards compatibility) or Rcpp (gives the same results, faster but more particular)

verbose

print information about variable search criteria?

x

NumericVector. X-axis values

y

NumericVector. Y-axis values

z

NumericVector. Z-axis values

Value

a vector of vector magnitude values

Examples

data(imu_to_collapse)

vm_columns <-
    grepl("accelerometer",
        names(imu_to_collapse),
        ignore.case = TRUE)

vm_values <- get_VM(
  data.frame(imu_to_collapse)[, vm_columns]
)

head(vm_values)


AGread documentation built on Sept. 13, 2022, 5:06 p.m.