Skip to contents

Adds 'file_created_on'-variable to a tidy dataframe

Usage

file_created_on(.data, var_name = "file_created_on")

Arguments

.data

a tidy dataframe

var_name

name of the variable to be added, defaults to "file_created_on"

Value

a tidy dataframe

Examples


library(magrittr)
# sample dataframe
df1 <- tibble::tibble(ID = seq_len(100), var1 = sample(c(1:3), 100, TRUE))

# add variable
file_created_on(df1)
#> # A tibble: 100 × 3
#>       ID  var1 file_created_on
#>    <int> <int> <date>         
#>  1     1     1 2024-07-31     
#>  2     2     3 2024-07-31     
#>  3     3     3 2024-07-31     
#>  4     4     1 2024-07-31     
#>  5     5     2 2024-07-31     
#>  6     6     3 2024-07-31     
#>  7     7     3 2024-07-31     
#>  8     8     3 2024-07-31     
#>  9     9     2 2024-07-31     
#> 10    10     1 2024-07-31     
#> # ℹ 90 more rows