Skip to content

Computer algebra in R - would that be an idea??

7 messages · Søren Højsgaard, bry@xdocs.dk, Martin Maechler +2 more

#
I think it is essential that the program which 'we' are trying to interface from R is under active development. I guess that it would also be 'politically wise' (and potentially useful) to ensure that the people behind Maxima and/or Yacas and/or ... find that it would be a good idea to interface their program from R (I don't see why they should not, though...)
 
Some time ago, I developed the mimR package which is essentially a wrapper to a statistical program called mim. The interfacing was made possible by that the creator of mim (David Edwards) made some small changes to his program such that it could be accessed programatically. I am not sure what the details were, but as I understood it at that time, it was not at whole lot of things that needed to be done. (And that was for Windows platforms only). Perhaps Yacas/Maxima/... - people could be talked into such changes of their packages??? Yet, it would require that R-people who know some details about such communications contact them..
 
Best regards
S?ren
 

________________________________

Fra: Robin Hankin [mailto:r.hankin at noc.soton.ac.uk]
Sendt: on 13-07-2005 09:04
Til: Gabor Grothendieck
Cc: S?ren H?jsgaard; Duncan Murdoch; r-devel at stat.math.ethz.ch
Emne: Re: [Rd] Computer algebra in R - would that be an idea??



Hi guys

another option would be David Gillespie's  "calc", which is written 
in emacs lisp.

This is a stable system with (AFAICS) as large user base.

Unfortunately, it doesn't seem to be actively developed, as the last 
stable version (2.02f)
appears to be 1996.  I don't know if this would be a contraindication.


Robin
On 13 Jul 2005, at 02:36, Gabor Grothendieck wrote:

            
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743
2 days later
#
bry> About a year ago there was a discussion about interfacing R with J on the J
    bry> forum, the best method seemed to be that outlined in this vector article 
    bry> http://www.vector.org.uk/archive/v194/finn194.htm

(which is interesting to see for me,
 if I had known that my posted functions would make it to an APL
 workshop... 
 BTW: Does one need special plugins / fonts to properly view
     the APL symbols ? )


    bry> and use J instead of APL

    bry> http://www.jsoftware.com

well, I've learned about J as the ASCII-variant of APL, and APL
used to be my first `beloved' computer language (in high school!)
-- but does J really provide computer algebra in the sense of
Maxima , Maple or yacas... ??

(and no, please refrain from flame wars about APL vs .. vs ..,
 it's hard to refrain for me, too...)

Martin Maechler, ETH Zurich
#
Just a note to point out that Martin's R implementation of APL's  
"take" function
was pretty neat.   Could we preserve it for posterity somewhere in the R
distribution?  Failing that, it would complement subsums() of the  
magic package
very nicely.


<mustn't flame APL....[holds head].....no flaming allowed........>


best wishes

Robin
On 15 Jul 2005, at 14:14, Martin Maechler wrote:

            
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743
#
I wonder if at this point it would be useful to think about how a 
symbolic algebra system might be used by R users, and whether that 
would affect the choice of system. For example, Maxima and yacas seem 
to be mostly concerned with "getting the job done", which might be 
all that the data analyst or occasional user needs. However, 
mathematical statisticians might be more concerned with developing 
new mathematics. For example, commutative algebra has been found to 
be very useful in the theory of experimental design (e.g. Pistone, 
Riccomagno, Wynn (2000) Algebraic Statistics: Computational 
Commutative Algebra in Statistics. Chapman & Hall). Now, Maxima can 
already do the necessary calculations (ie Groebner bases of 
polynomials), but as far as I know, yacas cannot. But who knows where 
the next breakthrough will come from? In that case Axiom might be 
more useful and appropriate, as it is largely used by research 
mathematicians. We would then need a mechanism for the development of 
new data structures in R that could potentially match Axiom's rich 
and extensible type system. I guess some mechanism that relies on S4 
classes would be necessary. Of course, there is nothing to stop us 
developing packages for more than one system ("We are R. We will 
assimilate you!"). I have no idea how to do any of this: I'm just 
floating ideas here. :-)

Cheers,

Simon.

  
    
#
No, but I was seeing this thread as more interest in expanding R's mathematical
capabilities in areas where it is weak, I think J is a good match.
1 day later
#
Hi

while everyone is discussing abstract algebra in R,
perhaps it would be good to let the list know about
pari.   From the FAQ

PARI/GP is a widely used computer algebra
system designed for fast computations in
number theory (factorizations, algebraic
number theory, elliptic curves...), but also
contains a large number of other useful
functions to compute with mathematical
entities such as matrices, polynomials,
power series, algebraic numbers, etc., and
a lot of transcendental functions.


My elliptic package has some basic functionality to evaluate
pari/gp statements via system() but I daresay there are better
ways to write a wrapper.

Would anyone on the List be interested in PARI wrapping?


best wishes

Robin
On 16 Jul 2005, at 04:12, simon blomberg wrote:

            
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743