vector_to_df: Open all the files and append rows to a single df

Description Usage Arguments Examples

View source: R/utilities.R

Description

This function allows you to combine all the files in the vector within a single df by reading them first as data.frames and then using bind_rows from dplyr package to combine them

Usage

1
vector_to_df(v, names = F, id_col = "id", ...)

Arguments

v

vector of paths to the files

names

bool, if true the name of the files will be used to create a new column with the name 'id_col'

id_col

string, name of the column that will be appended to the resulting df if names is TRUE

...

further parameters given to readr::read_csv

Examples

1
vector_to_df(v = c(path1, path2), names = T, id_col = 'st_id')

sitscholl/rebecka_package documentation built on Aug. 25, 2020, 4:20 a.m.