powered by
Calculates the width of a numeric vector by computing the difference between the maximum and minimum values in the vector.
width(x)
The width of the vector, calculated as the difference between its maximum and minimum values.
A numeric vector.
2024-2025 Tobias Schmidt: initial version.
vec <- c(1, 3, 5, 7, 9) width(vec)
Run the code above in your browser using DataLab