standardise | R Documentation |
Standardise values
standardise(x, grouping, min_valid, max_na, m = 0, sd = 1)
x |
A vector |
grouping |
A variable with group values for calculating grouped centered. |
min_valid |
Minimal number of valid values that is requiered for calculation. A value between 0 and 1 indicates a proportion of values (e.g., 0.5 = 50 percent of values have to be valid). |
max_na |
Maximum number of NAs that are allowed before returning NA. A value between 0 and 1 indicates a proportion of values (e.g., 0.5 = 50 percent NAs are allowed). |
m |
Mean after standardisation (default = 0) |
sd |
Mean after standardisation (default = 1) |
standardise( c(1:9, NA, NA, NA, NA, NA), m = 100, sd = 15)
standardise( c(1:95, NA, NA, NA, NA, NA), min_valid = 0.96)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.