View source: R/aided_chatgpt.R
sub.range | R Documentation |
This function calculates the difference between the maximum and minimum values of a numeric vector.
sub.range(x)
x |
A numeric vector for which the range difference is to be calculated. |
A numeric value representing the difference between the maximum and minimum values of the input vector. Returns 'NA' if the input is empty or contains only 'NA' values.
# Example with a numeric vector
numeric_vector <- c(1, 5, 3, 8, 2)
sub.range(numeric_vector)
# Example with missing values
sub.range(c(NA, 4, 7, NA, 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.