
Last chance! 50% off unlimited learning
Sale ends in
generates an evenly spaced grid given an input vector, matrix, or data.frame
which has size length.out
.
uniformGrid(x, length.out)
a vector, matrix, or data.frame
to create a grid on.
an integer giving the length of the grid.
an object of the same type as x
, with length.out
or fewer unique values.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab