Makes a data frame with the same columns of df and n_rows number of rows and all values fill_val

make_fill_df(df, n_rows = 1, fill_val = NA)

Arguments

df

a data.frame (or tibble) object

n_rows

number of rows for the final data frame

fill_val

value to fill all cells of the data frame

Value

a data frame (or tibble) with the desired number of rows filled with fill_val

Examples

df <- data.frame( col_a = c("A", "B"), col_b = c("C", "D") ) df
#> col_a col_b #> 1 A C #> 2 B D
make_fill_df(df, 5)
#> col_a col_b #> 1 NA NA #> 2 NA NA #> 3 NA NA #> 4 NA NA #> 5 NA NA