View source: R/application_prediction.R
scale_quantile | R Documentation |
scale_quantile
Cut off outer quantiles and rescale to a [0, 1] range
scale_quantile(x, outlier_cutoff = .05)
x |
A numeric vector, matrix or data frame. |
outlier_cutoff |
The quantile cutoff for outliers (default 0.05). |
The centered, scaled matrix or vector. The numeric centering and scalings used are returned as attributes.
## Not run:
## Generate a matrix from a normal distribution
## with a large standard deviation, centered at c(5, 5)
x <- matrix(rnorm(200*2, sd = 10, mean = 5), ncol = 2)
## Scale the dataset between [0,1]
x_scaled <- scale_quantile(x)
## Show ranges of each column
apply(x_scaled, 2, range)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.