I'd like to give a copy of an R package to someone using S-PLUS. It doesn't just run as-is, it'll need changes. Has anyone written any general guidelines on ways to port in that direction? Duncan Murdoch
On Fri, 18 Jul 2003, Duncan Murdoch wrote:> I'd like to give a copy of an R package to someone using S-PLUS. It > doesn't just run as-is, it'll need changes. Has anyone written any > general guidelines on ways to port in that direction?This depends a lot on what `S-PLUS' is (Unix/Windows, 3.4/4.x/2000/5.x/6.x are all different). My best shot is to refer to `S Programming' about constructing a package under the appropriate S-PLUS section. If it's a recent version of S-PLUS, you should convert the help files to Ssgm with Rdconv rename .R files to .q and uses a single-level directory structure. Beyond that it is a matter of experience and trial-and-error: if C is involved it is essential to have header files declaring (correctly) all entry points used. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595
Duncan Murdoch <dmurdoch@pair.com> writes:> I'd like to give a copy of an R package to someone using S-PLUS. It > doesn't just run as-is, it'll need changes. Has anyone written any > general guidelines on ways to port in that direction?I thought the other Duncan had some form of compatibility package on the Omegahat WWW site? best, -tony -- A.J. Rossini / rossini@u.washington.edu / rossini@scharp.org http://software.biostat.washington.edu/ UNTIL IT MOVES IN JULY. Biomedical and Health Informatics, University of Washington Biostatistics, HVTN/SCHARP, Fred Hutchinson Cancer Research Center. FHCRC: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}
On Fri, 18 Jul 2003 08:14:53 -0400, you wrote:>I'd like to give a copy of an R package to someone using S-PLUS. It >doesn't just run as-is, it'll need changes. Has anyone written any >general guidelines on ways to port in that direction?The package in question is "orientlib", the one I recently put on CRAN. It uses S version 4 methods, and those seem to be the problem. There are a number of small differences that cause trouble (e.g. the first argument in weighted.mean is named "y" in S-PLUS, but "x" in R, so I get complaints when converting it to a method), and something that's beyond my debugging abilities: calling a method appears to call the default method instead of the appropriate one based on the signature. Calling getMethod to diagnose the problem also appears to call the default method !?! This is all in S-PLUS 6.1 for Windows. Obviously R-help is the wrong place to be asking for this sort of detailed help; I guess I'll try over in s-news. Duncan Murdoch