normalized | R Documentation |
Provides a data.frame that takes the matrix or data.frame and finds the weighted mean of each column and then divides each column of values by the column's weighted mean.
normalized(df, wts = NULL, na.rm = TRUE)
df |
numeric Data.frame of one or more columns of values to be normalized, or matrix or vector to be coerced to data.frame |
wts |
numeric Weights to use when computing weighted mean of given column, one weight per row in df (default=1) or per element of vector df. If omitted, default is unweighted mean. |
na.rm |
logical Whether to exclude rows where weight or value or both = NA. |
Uses scale()
matrix same size as df, but with all values in given column divided by weighted mean of that column
scale()
## Not run:
mydf_norm <- tbd
## #
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.