fars_read: Read a CSV-file into R silently

Description Usage Details

View source: R/fars_functions.R


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.




@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 March 19, 2018, 3:13 a.m.