get_VM: Calculate vector magnitude

Description Usage Arguments Value Examples

View source: R/AGread_utils.R

Description

Calculate vector magnitude

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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 Feb. 26, 2020, 5:12 p.m.