[Rd] TeXmacs and R 2.0.0
M. Edward Borasky
znmeb at cesmail.net
Mon Nov 22 00:02:36 CET 2004
On Sun, 2004-11-21 at 22:39 +0100, Peter Dalgaard wrote:
> <pedantic>
> That's a
> <strong>
> PACKAGE
> </strong>
> !!
> </pedantic>
>
> This is of course the Wrong Way. The Right Way (or one of them) is to
> provide a source package that can be installed using R CMD INSTALL on
> whatever system the user has, and fixed up to meet the changing
> requirements of the R installer (which are usually backwards
> compatible). Even better, maintain said package at CRAN so that it
> will be automatically checked against the current patch and
> development versions and get built for devtool-challenged operating
> systems.
In fact, I suggested to the TeXmacs team that they do just that: build a
source package and submit it to CRAN. I've clearly labelled what I did
as a workaround every place I've posted about it -- R-devel, the TeXmacs
list and the "Gentoo Science" list.
I'm the messenger here, not a developer with any formal status either
with Gentoo, R or TeXmacs. And I wasn't willing to drop back to R 1.9.1
to get R sessions in a TeXmacs document. It turned out some anonymous
user had run into this before me and filed a bug on the TeXmacs bug
list, which saved me the trouble of doing so.
There is still the issue of sequencing between installs of R and
TeXmacs. When TeXmacs does its "configure", if it doesn't find R, it has
to inform the user somehow that if R is installed later, the user will
need to find the package and install it. It can't install the package
without R. Nor, of course, can a TeXmacs user start an R session inside
TeXmacs without R. :)
>
> >
> > The workaround is (as "root"):
> >
> > 1. Edit
> >
> > /usr/share/TeXmacs/plugins/r/r/TeXmacs/DESCRIPTION
> >
> > and remove the line at the bottom that starts with "Built:"
> >
> > 2. Type
> >
> > R CMD build --force TeXmacs
> >
> > 3. Type
> >
> > R CMD INSTALL -l `pwd` TeXmacs_0.1.tar.gz
> >
> > My question is this: do I actually need to do the INSTALL, or is the
> > build, followed by deleting the built package, enough? I've passed what
> > I know so far on to the TeXmacs team; eventually they will incorporate
> > some cleaner fix into their code, but I have no idea exactly how that
> > will work, since they need to be able to work with older versions of R
> > as well.
>
> Yup, you'll need the INSTALL. The 'R CMD build' just creates a source
> package based on the source directory, which you effectively
> reverse-engineered out of the (in principle) binary install. But why
> not '-l /usr/share/TeXmacs/plugins/r/r/'?
>
> BTW, last I checked, the TeXmacs plugin did have a rather peculiar
> habit of opening one R session and using that for all subsequent
> access, no matter where they occurred in the text. This can have some
> peculiar effects with a stateful system like R (using a variable
> before it was calculated, redoing a calculation but not code that
> depends on it further along in the text, etc.). Is this still so? A
> more Sweave-like approach would be highly desirable.
>
More information about the R-devel
mailing list