fars_read: Read a CSV-file into R silently

Description Usage Details

Description

This is a function that checks if a file exists (the (file specified in the filename argument)) - throws an error if it does not - and then silently uses read_csv from the readr-package to read the csv-file into the current environment.

Usage

1
fars_read(filename)

Details

@param filename A character string giving the file the function will read into R

@return This function returns a data frame (a tibble) representing the data in the csv-file

@importFrom readr read_csv @importFrom dplyr tbl_df

@examples write.csv("testdata.csv", data.frame(x = seq(1,10, 1), y = seq(1,10, 1), stringsAsFactors = F)) fars_read("testdata.csv")


A-Lind/BuildingAnRPackage documentation built on May 26, 2019, 6:37 a.m.