[R] Problems with CRAN package Ryacas

Martin Maechler maechler at stat.math.ethz.ch
Mon Apr 9 20:47:52 CEST 2012


Apropos:

I don't have the problems, the OP had, but on my ubuntu
notebook, Ryacas does not return expressions (just the strings),
and hence

    as.expression( <yacas-result> )

always gives NULL  and e.g. the   demo(Ryacas-Function)
also fails:

 > yacas(expression(deriv(BurrCDF(x,c,k))))
 k*c*x^(c-1)*(x^c+1)^(-(k+1));
 > yy <- yacas(expression(deriv(BurrCDF(x,c,k))))
 > yy
 k*c*x^(c-1)*(x^c+1)^(-(k+1));
 > str(yy)
 List of 2
  $          : NULL
  $ YacasForm: chr "k*c*x^(c-1)*(x^c+1)^(-(k+1));"
  - attr(*, "class")= chr "yacas"
 > 

I have 

- yacas 1.2.2  (standard ubuntu package)
- re-installed Ryacas  (manually from source, just now, 
  	       	        under R 2.15.0 patched)

> sessionInfo()
R version 2.15.0 Patched (2012-04-09 r58947)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=de_CH.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=de_CH.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=de_CH.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_CH.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] graphics  grDevices datasets  stats     utils     methods   base     

other attached packages:
[1] Ryacas_0.2-11  XML_3.9-4      fortunes_1.5-0 sfsmisc_1.0-20

loaded via a namespace (and not attached):
[1] compiler_2.15.0 tools_2.15.0   
> 

------------------------------------------------------------------

On our Fedora computers at work (with an *older* version of yacas,
installed manually from sources there),
things work fine :

 > str(yacas(expression(Factor(x^2-1))))
 List of 2
  $ text  :  expression((x + 1) * (x - 1))
  $ OMForm: chr [1:15] "<OMOBJ>" "  <OMA>" "    <OMS cd=\"arith1\" name=\"times\"/>" "    <OMA>" ...
  - attr(*, "class")= chr "yacas"
 > as.expression(yacas(expression(Factor(x^2-1))))
 expression((x + 1) * (x - 1))
 >



More information about the R-help mailing list