library(gdxrrw) data1 <- rgdx("allData.gdx", list(name="x", field="all")) dataX <- rgdx("justX.gdx", list(name="x", field="all")) str(data1) str(dataX) # important facts: "the UEL universe" is all the UELs available at one # time or to one environment. With GDX, the universe is all the UELs in the GDX. # To see it, do from a command prompt: # gdxdump justX.gdx uelTable=theUniverse # the * is used to represent the universe # dataX contains limited domain information, so we get the data back as # if it were declared over the universe, i.e. S(*,*) # if we want it another way, we can provide a UEL filter. # We can call this method 2: filter2 <- list(c('a','b','c'),c('1','2','3')) data2 <- rgdx("justX.gdx", list(name="x", field="all", uels=filter2)) # method 2 is pretty lame: we would not want to bake the uel filter into the # script itself. We can read the UELS from a GDX file, for example: s <- rgdx('allData.gdx',list(name='s',compress=T)) suels <- s$uels[[1]] t <- rgdx('allData.gdx',list(name='t',compress=T)) tuels <- t$uels[[1]] filter3 <- list(suels,tuels) data3 <- rgdx("justX.gdx", list(name="x", field="all", uels=filter3))