get_midpoints | R Documentation |
A helper function that returns a vector of q equally spaced points within the intervals specified by x_breaks
get_midpoints(x_breaks, q = 1)
x_breaks |
a (n+1) vector defining a partition of an interval |
q |
an integer specifying the number of points within interval |
an n vector of the midpoints of x_breaks
x_breaks <- c(0, 2, 3, 5, 8) x_mid <- get_midpoints(x_breaks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.