[R] Ryacas not working properly

Gabor Grothendieck ggrothendieck at gmail.com
Sat Nov 25 13:52:18 CET 2006


Ryacas starts up yacas with an initialization file R.ys which puts
the server in a mode which outputs XML (which is what Ryacas reads).
It does that by specifying --init /whatever/R.ys on the yacas command line
when it is run.

You can run yacas without that init file or you can just enter into yacas
this to turn off XML output:

   PrettyPrinter()

See the demo

   demo("Ryacas-PrettyPrinter")


So if you are running yacas independently of R then

If you wish to run yacas outside of R just issue the command:

yacas

or maybe

yacas --init /dev/null

(untested)

On 11/25/06, Paul Smith <phhs80 at gmail.com> wrote:
> On 11/19/06, Marc Schwartz <marc_schwartz at comcast.net> wrote:
> > this might be a firewall/SELinux/"On Demand Services" problem, I have, I
> > think, nailed it down to two key things on FC6:
> >
> > 1. It requires the use of the '--enable-server' configure option for
> > yacas itself.
> >
> > 2. There is a directory permissions problem in the Ryacas package,
> > restricting a regular user's access to the files located in the 'yacdir'
> > subdirectory.
> >
> > Note that in the instructions below, I also install the GSL, which
> > presumably is not required, but I did it anyway after noting some
> > warnings during the yacas build process.
> >
> > One other thing, which is that when downloading the Ryacas package from
> > the Google site using Firefox, the file is downloaded as:
> >
> >   Ryacas_0.2 3.tar.gz
> >
> > Note the missing '-' between the 2 and 3.  Be sure to check for this
> > when saving the tarball to disk.
> >
> >
> > So here goes:
> >
> >
> > 1. Install the GSL (including the devel RPM) as root:
> >
> >   yum install gsl*
> >
> >
> >
> >
> > 2. Install yacas from the source tarball using:
> >
> >   ./ configure --enable-server
> >   make
> >
> >   then as root:
> >
> >   make install
> >
> >
> >
> >
> > 4. Install the Ryacas package as root:
> >
> >   R CMD INSTALL Ryacas_0.2-3.tar.gz
> >
> >
> > Be sure that you also have the 'XML' package from CRAN installed, which
> > is a dependency for Ryacas.
> >
> >
> >
> >
> > 3. Change the permissions for /usr/local/lib/R/library/Ryacas/yacdir:
> >
> > Note that the default permission for this directory after installation
> > is:
> >
> > drwxr--r-- 2 root root  4096 Nov 19 15:17 yacdir
> >
> >
> > Thus:
> >
> >  su
> >  chmod +x /usr/local/lib/R/library/Ryacas/yacdir
> >
> >
> > Now:
> >
> > drwxr-xr-x 2 root root  4096 Nov 19 15:17 yacdir
> >
> >
> >
> > Now in R as a regular user:
> >
> > > library(Ryacas)
> > Loading required package: XML
> >
> > > yacas("5/8 * 3/4")
> > [1] "Starting Yacas!"
> > Accepting requests from port 9734
> > expression(15/32)
> >
> > > yacas("3/7 * 5/9")
> > expression(5/21)
>
> There a side effect that I would like to remove: yacas compiled with
> the option '--enable-server' runs like this
>
> In> x := 2
> <OMOBJ>
>  <OMI>2</OMI>
> </OMOBJ>
> In> x
> <OMOBJ>
>  <OMI>2</OMI>
> </OMOBJ>
> In>
>
> i.e., with, apparently, xml commands. How can one run yacas normally,
> without those pieces of xml?
>
> Paul
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list