I just want to add my 2 cents regarding R integration in gretl.
The concern that the relevancy of gretl may be questionable given that
R has been so successfull and getting a lot of attention in the recent
years has been brought in the gretl conference back in Bilbao. Part of
the concern was that gretl has only a handful of packages where as R
has thousands of them.
I think that R is great but when it comes to econometrics, gretl is
probably bigger and this probably won't change in the future as well.
This is partly because many of the R packages are known to be
"not-too-good" (to be polite) and there exists a very small number of
packages relating to econometrics. Also, R packages are perpared and
maintained (or not maintained) by different different people so it is
difficult to rate the quality as a whole package for econometrics. R
is essentially a statistical environment, which represents only a part
of what econometrics is. It is true that R provides a great basis for
creating econometrical functions and procedures but so does gretl
especially in the latest versions and it is getting better and better
in this department as well.
To my undrestanding, some of the motives for R integration, in the
past, has been in order to be able to reach functionality not yet
available in gretl. This includes using R's graphical power. Comparing
results is probably another important motive as well. In conclusion,
my humble opinion is that gretl is quickly becoming a great
environment for econometrics and maybe we should aim at making gretl
more beautiful and be careful in taking a step that can turn it into a
freak of nature.
Cheers
Talha
On Tue, Jul 7, 2009 at 9:46 AM, Riccardo (Jack)
Lucchetti<r.lucchetti(a)univpm.it> wrote:
On Mon, 6 Jul 2009, Allin Cottrell wrote:
>> (a) what happens in case of a name clash? ...
>
> Yes, indeed. I've been thinking about that too. The first point
> to make is that trying to interpret a "word" as an R function name
> is the "last resort" in genlex.c. So any built-in, or
> user-defined, gretl function will mask an R function of the same
> name.
>
>> Perhaps we may wrap R function calls in an ad-hoc function, like
>>
>> <gretlscript>
>> scalar c = R("choose(10,4)")
>> </gretlscript>
>
> My first thought on this is to the same effect but a little
> simpler: we could mark off R functions (either built-in, or
> defined via "foreign" blocks within gretl) by using the prefix
> "R_". So if you wanted to invoke the R "choose" function
you'd
> have to invoke it as "R_choose(args)". (Internally, we'd see the
> "R_" and pass the remainder of the word to the new function
> get_R_function_by_name().)
I like this. The only possible problem I can see is parsing the string
correctly when a dot is there, as in R_as.matrix()
>> (b) are there portability problems?
>
> Yes, it does raise a portability issue. We do have some of those
> already: for example, the gretl command "mpols" will work only if
> gretl is linked against (the optional) libgmp. There's also the
> business of the optional third-party programs TRAMO/SEATS and
> X-12-ARIMA. At present the functionality of these programs is
> available only via the GUI, but it probably should be available
> via script.
True. And you can add LaTeX on top of that if you want. But you'll agree the
ones you mention are rather special cases: mpols is definitely not something
you'd normally use for regressions, and the TRAMO/SEATS-X12 stuff is hard to
use inadvertently, so to speak. My concern was coming from the idea that if
you start mixing native and R functions in your scripts, to the point when
it's hard to tell them apart, as in your choose() example, then one day you
take your script to another machine where R isn't installed and, bang!, your
script is useless.
> There are some other issues too.
[...]
>
> I'm just saying that the libR approach is not a magic bullet for
> saving on initialization costs.
Chris' work and yours have been splendid. Integration with R is now much,
much better than it was. Thanks!
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel
--
“Remember not only to say the right thing in the right place, but far
more difficult still, to leave unsaid the wrong thing at the tempting
moment.” - Benjamin Franklin (1706-1790)
--