Description Usage Arguments Details Value Note Examples
View source: R/fars_functions.R
This functions reads a flat file (text file encoded in ASCII) in the current working directory and returns it as an object of the "tbl_df" class. If the file does not exist in the current directory, this function stops execution with an error message. The progress while the file is being read is not displayed. Similarly, messages are also suppressed. It is an internal (supporting) function used by other functions in this package.
1 | fars_read(filename)
|
filename |
A character string containing the name of the csv file to be
read, residing in the current working directory. CSV file can also be
compressed as allowed by the |
This function uses the read_csv()
function from the
readr
package, with progress = FALSE
parameter.
After reading the data from the csv file, the tbl_df()
function from the dplyr
package is called to convert the
data into the tabl_df format before returing it.
This function is also exported, so users will have direct access to
it when they load the package conataining this function.
This function returns an object of class "tbl_df" (table dataframe)
from the dplyr
package.
The file passed as a parameter (filename
) must exist in the
current working directory. Otherwise, this function stops execution
with an error message: "file 'filename
' does not exist".
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.