| fun_skip_sphere_norm | R Documentation |
Scales all rows of a numeric dataframe by dividing by the largest row vector length (L2 norm) found in the dataframe. This preserves the relative magnitudes between rows but does not normalize each row to unit length. Useful for analyses where relative scale is important but full normalization is not desired.
fun_skip_sphere_norm(dfM)
dfM |
A data.frame or matrix. Each row is treated as a vector to compute its L2 norm. |
Row-wise Max-Norm Scaling
This function finds the row with the largest L2 norm (Euclidean length) and divides all entries in the matrix by this value. It does not normalize each row individually.
A numeric matrix with the same dimensions as 'dfM', with all values divided by the largest row L2 norm.
df <- data.frame(a = c(3, 4), b = c(0, 0))
fun_skip_sphere_norm(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.