seq_range | R Documentation |
Generate a sequence over the range of a vector
seq_range(x, n, by, trim = NULL, expand = NULL, pretty = FALSE)
x |
A numeric vector |
n, by |
Specify the output sequence either by supplying the
length of the sequence with I recommend that you name these arguments in order to make it clear to the reader. |
trim |
Optionally, trim values off the tails.
|
expand |
Optionally, expand the range by |
pretty |
If |
x <- rcauchy(100)
seq_range(x, n = 10)
seq_range(x, n = 10, trim = 0.1)
seq_range(x, by = 1, trim = 0.1)
# Make pretty sequences
y <- runif(100)
seq_range(y, n = 10)
seq_range(y, n = 10, pretty = TRUE)
seq_range(y, n = 10, expand = 0.5, pretty = TRUE)
seq_range(y, by = 0.1)
seq_range(y, by = 0.1, pretty = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.