Skip to content

Commit

Permalink
fix bugs on extracting sets
Browse files Browse the repository at this point in the history
  • Loading branch information
lolow committed Mar 10, 2016
1 parent 7c3e8ad commit 929af05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/gdx.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ extract.gdx <- function(x, item, field = "l", addgdxname = F, ...) {
} else if(item %in% x$parameters$name){
res = gdxrrw::rgdx(x$filename, list(name = item), squeeze = F)
text = x$parameters$text[item==x$parameters$name]
} else {
} else if(item %in% x$sets$name){
res = gdxrrw::rgdx(x$filename, list(name = item), squeeze = F)
text = x$sets$text[item==x$sets$name]
}else {
warning("item not found")
return(NULL)
}
Expand Down

0 comments on commit 929af05

Please sign in to comment.