Description Usage Arguments Value Note Examples
generates an evenly spaced grid given an input vector, matrix, or data.frame
which has size length.out
.
1 | uniformGrid(x, length.out)
|
x |
a vector, matrix, or |
length.out |
an integer giving the length of the grid. |
an object of the same type as x
, with length.out
or fewer unique values.
for unordered factors and characters, if length.out < length(unique(x))
length.out
is set to length(unique(x))
. if x
is a data.frame
and this is true of some columns but not others, there will be a warning.
1 2 3 4 5 6 7 8 | data = data.frame(
w = seq(0, 1, length.out = 5),
x = factor(letters[1:5]),
y = ordered(1:5),
z = 1:5
)
lapply(data, uniformGrid, length.out = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.