how to know which R function

19 views
Skip to first unread message

Srirama Bhamidipati

unread,
Jun 6, 2014, 6:54:18 AM6/6/14
to gama-p...@googlegroups.com
Hi,

When dealing with R in GAMA, I am unable to understand, how does the GAMA compiler know when I am calling R. For example:

model CallingR
global
{
list X <- [2, 3, 1];
list Y <- [2, 12, 4];
list result;
init{
write corR(X, Y); // -> 0.755928946018454
write meanR(X); // -> 2.0
}
}


how does GAMA know what is corR ? how do I call other R functions ? 

Thanks
Srirama

Benoit Gaudou

unread,
Jun 6, 2014, 8:16:28 AM6/6/14
to gama-p...@googlegroups.com
Hi,

Actually "corR" is an operator of the GAML language, with some java code associated.
And you call it in "write corR(X, Y);", the java code below call R (via an aPI to call R from java).

Cheers

Benoit


--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

Srirama Bhamidipati

unread,
Jun 10, 2014, 5:11:03 AM6/10/14
to gama-p...@googlegroups.com
Thank you Benoit. 
Reply all
Reply to author
Forward
0 new messages