new_data | R Documentation |
Generates a new data frame (in the form of a tibble) with each variable held constant or varying as a unique ordered sequence.
new_data(
data,
seq = character(0),
ref = list(),
obs_only = list(character(0)),
length_out = 30
)
Although superseded it is maintained for backwards compatibility with existing code.
The code
new_data(data, seq = c("a", "b"), length_out = 30)
is effectively a wrapper for
xnew_data(data, a, b, .length_out = 30)
to allow a string of column names to be passed.
A tibble of the new data.
xnew_data()
.
new_data(old_data, "int")
new_data(old_data, "dbl")
new_data(old_data, c("int", "dbl"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.