read.snapshot: Reads IAMC-style .csv files obtained as a IIASA snapshot into...

View source: R/read.snapshot.R

read.snapshotR Documentation

Reads IAMC-style .csv files obtained as a IIASA snapshot into a quitte data frame, filtering the data. This function is helpful if the csv file is large and R runs out of memory loading it completely. This function requires head, tail and grep on your system. If not supported, use read.quitte().

Description

Reads IAMC-style .csv files obtained as a IIASA snapshot into a quitte data frame, filtering the data. This function is helpful if the csv file is large and R runs out of memory loading it completely. This function requires head, tail and grep on your system. If not supported, use read.quitte().

Usage

read.snapshot(file, keep = list(), filter.function = NULL)

Arguments

file

Path of single IAMC-style .csv/.mif file

keep

list with quitte columns as names and data points that should be kept. Using 'grep', 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.

Value

A quitte data frame.

Author(s)

Oliver Richters

Examples

## Not run: 
read.filter.snapshot("snapshot.csv", list(scenario = c("CurPol", "NDC"), region = "World"))

## End(Not run)


pik-piam/quitte documentation built on April 26, 2024, 12:58 a.m.