powered by
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.
.dim_*
fftab
add_l2nm(x)add_l2sq(x)get_l2nm(x)get_l2sq(x)
add_l2sq(x)
get_l2nm(x)
get_l2sq(x)
A vector or fftab object with additional columns:
l2nm: The L2 norm of the frequency dimensions.
l2nm
l2sq: The squared L2 norm of the frequency dimensions.
l2sq
A fftab object containing frequency dimensions (.dim_*) and associated metadata.
add_l2nm(): Appends a column l2nm containing the L2 norm, calculated as the square root of the sum of squared values across .dim_* columns.
add_l2nm()
add_l2sq(): Appends a column l2sq containing the squared L2 norm, calculated as the sum of squared values across .dim_* columns.
add_l2sq()
get_l2nm(): Returns a numeric vector representing the L2 norm for each row.
get_l2nm()
get_l2sq(): Returns a numeric vector representing the squared L2 norm for each row.
get_l2sq()
fftab()
tibble::add_column()
matrix(1:9, 3) |> fftab() |> print(n = 3) |> add_l2nm() |> print(n = 3) |> add_l2sq() |> print(n = 3)
Run the code above in your browser using DataLab