Learn R Programming

rplexos (version 1.1.11)

is_sample_stats: Test if elements in sample column are statistics

Description

In stochastic simulations, PLEXOS will return sample results and their statistics together. This function makes it easy to separate them with a filter.

Usage

is_sample_stats(x)

Arguments

x
Vector of sample values from an rplexos query

Examples

Run this code
## Not run: db <- plexos_open()
## Not run: res <- query_month(db, "Generator", "Generation")
## Not run: res %>% filter(sample_stats(sample))    # To obtain statistics
## Not run: res %>% filter(!sample_stats(sample))   # To obtain sample results

Run the code above in your browser using DataLab