View source: R/df_populate_range.R
df_populate_range | R Documentation |
Generate sequences of n equidistant data points for a column in a data frame.
df_populate_range(df, column, n = 100)
df |
A data frame. |
column |
<tidy-select> The column with data to populate. |
n |
Length of the sequence to return. Defaults to 100. |
A data frame.
require(dplyr, warn.conflicts = FALSE, quietly = TRUE)
require(tidyr, warn.conflicts = FALSE, quietly = TRUE)
tibble(A = (1:3) ^ 2,
B = exp(0:2)) %>%
pivot_longer(everything()) %>%
arrange(name, value) %>%
print() %>%
df_populate_range(value, n = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.