Quantcast
Channel: Yet Another Math Programming Consultant
Viewing all articles
Browse latest Browse all 804

Data manipulation in GAMS, R or SQL

$
0
0

When moving data from GAMS to R via SQLite we have three possible spots where we can apply some data manipulation:

image

Suppose we want to plot some data but need to do:

image

Here is the code in GAMS:

image

I could do the same thing in R, but the code is slightly more messy:

image

The final attempt is in SQL, which is not too bad either (but with nested queries more complicated than the GAMS version):

image 

In all cases we did not use any loops.


Viewing all articles
Browse latest Browse all 804

Trending Articles