stdz | R Documentation |
Standardizes values by subtracting the mean and dividing by the standard deviation.
Standardizes values by subtracting the mean and dividing by the standard deviation.
stdz(object, na.rm = TRUE)
stdz(object, na.rm = TRUE)
## S4 method for signature 'numeric'
stdz(object, na.rm = TRUE)
## S4 method for signature 'matrix'
stdz(object, na.rm = TRUE)
## S4 method for signature 'array'
stdz(object, na.rm = TRUE)
## S4 method for signature 'FLQuant'
stdz(object, na.rm = TRUE)
na.rm |
Logical indicating whether to remove NA values when computing statistics |
x |
A numeric vector, matrix, array or FLQuant |
Standardization follows the formula: (x - mean(x))/sd(x)
Standardization follows the formula: (x - mean(x))/sd(x)
An object of the same class as the input with standardized values
An object of the same class as the input with standardized values
## Not run:
# For numeric vector
x <- 1:10
stdz(object)
# For FLQuant
data(ple4)
standardized_catch <- stdz(catch(ple4))
## End(Not run)
## Not run:
# For numeric vector
x <- 1:10
stdz(object)
# For FLQuant
data(ple4)
standardized_catch <- stdz(catch(ple4))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.