View source: R/read.snapshot.R
read.snapshot | R Documentation |
Reads IAMC-style .csv or .xlsx files obtained as a IIASA snapshot into a quitte data frame, or data from rds file, allowing to filter the loaded data. If head, tail and grep are on your system, a pre-filtering improves performance for csv files.
read.snapshot(file, keep = list(), filter.function = identity)
file |
Path of single IAMC-style .csv/.mif/.xlsx/.rds file |
keep |
list with quitte columns as names and data points that should be kept. If head, tail and grep are available and a csv/mif file is read, this list is used to extract the data before reading it into R. The more you restrict the data here, the faster the data is read. |
filter.function |
A function used to filter data during read, see read.quitte description. This allows for more complex filtering, but no performance-enhancing pre-filtering using grep is used. The 'keep' list and the 'filter.function' can be combined. |
A quitte data frame.
Oliver Richters
## Not run:
read.filter.snapshot("snapshot.csv", list(scenario = c("CurPol", "NDC"), region = "World"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.