df_populate_range: Populate Data With Sequence Along Range

View source: R/df_populate_range.R

df_populate_rangeR Documentation

Populate Data With Sequence Along Range

Description

Generate sequences of n equidistant data points for a column in a data frame.

Usage

df_populate_range(df, column, n = 100)

Arguments

df

A data frame.

column

<tidy-select> The column with data to populate.

n

Length of the sequence to return. Defaults to 100.

Value

A data frame.

Examples

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)


pik-piam/quitte documentation built on April 26, 2024, 12:58 a.m.