[R] Conversion of S+ libraries

Bill.Venables at csiro.au Bill.Venables at csiro.au
Sat Oct 23 04:04:13 CEST 2010


Bill D. is quite right, I did have in mind conversion the other way round.  I am happy to concede.  

The interesting thing for me is the (relatively) automatic conversion from .sgml to .Rd format.  This is likely to speed things up considerably.

Bill. 

-----Original Message-----
From: William Dunlap [mailto:wdunlap at tibco.com] 
Sent: Saturday, 23 October 2010 1:11 AM
To: Venables, Bill (CMIS, Cleveland); Glenn.Treacy at ilim.com; r-help at r-project.org
Subject: RE: [R] Conversion of S+ libraries

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of 
> Bill.Venables at csiro.au
> Sent: Thursday, October 21, 2010 5:33 PM
> To: Glenn.Treacy at ilim.com; r-help at r-project.org
> Subject: Re: [R] Conversion of S+ libraries
> 
> It would certainly not be straightforward, unless Tibco has 
> done a lot of work to make it possible in recent years, 
> (which is not unlikely).  They have done a lot of work in the 
> other direction, i.e. enabling R packages to be used within S-PLUS.

In my experience porting S+ code to R is not very difficult,
as long as your code doesn't rely on manipulating the S+ Windows
GUI, using the S+ importData and exportData functions, using
Connect/C++  or Connect/Java, using the bigdata package, or 
using graphlets (applets for interactive graphics in web pages).

Most of the items Bill V. noted are problems when porting from
R to S+ but not the other way around.

I recommend first making your code into a package (the
structure of which is very similar in S+ and R).  You
can convert an S+ *.sgml help file to an R *.Rd help file
with 'Splus CMD Sd2Rd file.sgml > file.Rd'.  Install
the package using both S+ and R and run your tests in both.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> 
> S-PLUS has the concept of a "chapter", which roughly 
> corresponds to a working directory in R, but also the 
> package.  The chapter is already strongly file structured, 
> and quite different to the way R has of doing things.  There 
> is also the notorious scoping rule problem which makes 
> translation of advanced code quite tricky, if not actually 
> impossible.  S-PLUS does not (or at least did not) have the 
> equivalent R environments, for example.  It has a concept of 
> "frames", which is a very different thing and much less flexible.
> 
> When moving from S-PLUS libraries to R packages, my approach 
> would be to go back to the code, get it working in R and then 
> build the R package.  The middle part, getting it going in R, 
> may take some time.
> 
> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Treacy, Glenn
> Sent: Thursday, 21 October 2010 7:27 PM
> To: r-help at r-project.org
> Subject: [R] Conversion of S+ libraries
> 
> Does anyone have any advice on converting S+ libraries to R packages?
>  
> Glenn
> 
> --
> **************************************************************
> ********************
> Irish Life Investment Managers Limited is regulated by the 
> Central Bank of Ireland.  Irish Life Investment Managers 
> Limited Registered Office: Beresford Court, Beresford Place, 
> Dublin 1.  Registered in Ireland Number 116000
> 
> While Irish Life Investment Managers uses reasonable efforts 
> to ensure that the information contained in this email is 
> current, accurate and complete at the date of publication, no 
> representations or warranties are made (express or implied) 
> as to the reliability, accuracy or completeness of such 
> information. Irish Life Investment Managers therefore cannot 
> be held liable for any loss arising directly or indirectly 
> from the use of, or any action taken in reliance on, any 
> information contained in this email. 
> 
> This material is for information only and does not constitute 
> an offer or recommendation to buy or sell any investment, or 
> subscribe to any investment management or advisory service. 
> It is intended for the use of institutional and other 
> professional investors. Past performance is not indicative of 
> future results. The value of funds we manage may fall as well as rise.
> 
> This email and any files transmitted with it are 
> confide...{{dropped:16}}
> 
> ______________________________________________
> R-help at r-project.org 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.
> 
> ______________________________________________
> R-help at r-project.org 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