NREL / rplexos

Other
18 stars 13 forks source link

Query Specific Scenario #41

Closed BenjaminWatts closed 8 years ago

BenjaminWatts commented 9 years ago

Is there an easy way of querying a specific, or a few scenarios

Imagine something like this

query_year(db, Generator, Generation, filter = list(scenario = "High Wind")...

OR

query_year(db, Generator, Generation, filter = list(scenario =c("Low Wind", "High Wind"))...

eibanez commented 8 years ago

You can subset db first and then query.

BenjaminWatts commented 8 years ago

Hey -- thanks for this suggestion. What command would you use to subset the db - when I try using subset(db, scenario == x) or db[,1] then I the Type becomes tbl_df instead of rplexos, and so query_year rejects it?

eibanez commented 8 years ago

try doing the following after subsetting:

class(subset.db) <- class(db)