Description Usage Arguments Value
View source: R/snapshot_import.R
This function imports consecutive snapshots of the data into a list output. If there is only one snapshot input requested, it will return a single dataframe as is. Unless otherwise supplied, the output list will reference the snapshots as dfA, dfB, dfC, and so on, to ensure that the output can be supplied to other functions generically.
1 2 3 4 |
path |
File path to target. Defaults to current directory. |
file_prefix |
File name prefix. Defaults to empty string. |
units |
Snapshot ID e.g. 20180426. |
file_suffix |
File name suffix. Defaults to empty string. |
file_type |
Input file type. Currently takes in .txt and .csv. Defaults to .txt. |
col_classes |
A list of column classes for faster import, if available. Defaults to NULL. |
n_max |
Maximum number of records to import. Defaults to Inf. |
enc |
Encoding. Default is ISO-8859-1, to account for certain names. |
del |
Delimiter. Default is tab. |
quote |
Set of quoting characters. Default is an empty string. |
col_names |
Whether column names exist in the dataframe. Defaults to TRUE. |
na |
NA characters to be interpreted. Defaults to empty string. |
ref |
Reference for snapshot imports when more than two are imported. Defaults to English lowercase alphabets. |
package |
Delimited file reading package. Defaults to 'readr' read_delim but can be 'base' read.delim. |
... |
Other arguments to be passed to readr::read:csv or readr::read_delim |
A list of dataframes of the desired data. If only a single unit is input, a single dataframe.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.