add_l2nm {fftab} | R Documentation |
Add L2 Norm and Squared L2 Norm of Frequency Dimensions
Description
These functions compute and append the L2 norm and squared L2 norm of the frequency dimensions
(.dim_*
columns) as new columns in a fftab
object.
Usage
add_l2nm(x)
add_l2sq(x)
get_l2nm(x)
get_l2sq(x)
Arguments
x |
A |
Details
-
add_l2nm()
: Appends a columnl2nm
containing the L2 norm, calculated as the square root of the sum of squared values across.dim_*
columns. -
add_l2sq()
: Appends a columnl2sq
containing the squared L2 norm, calculated as the sum of squared values across.dim_*
columns. -
get_l2nm()
: Returns a numeric vector representing the L2 norm for each row. -
get_l2sq()
: Returns a numeric vector representing the squared L2 norm for each row.
Value
A vector or fftab
object with additional columns:
-
l2nm
: The L2 norm of the frequency dimensions. -
l2sq
: The squared L2 norm of the frequency dimensions.
See Also
Examples
matrix(1:9, 3) |>
fftab() |>
print(n = 3) |>
add_l2nm() |>
print(n = 3) |>
add_l2sq() |>
print(n = 3)