R-alpha: Design and Hmisc

Jim Lindsey jlindsey@luc.ac.be
Fri, 14 Nov 1997 09:33:48 +0100 (MET)


I have been looking at porting Design and Hmisc to R. Unfortunately, I
know nothing about S and do not have access to it. Basically what I
have found is that many functions work directly, as long as they do
not involve data.frames or models. These two create a lot of
incompatibilities.
  Here is what I had to do to get the functions to load:
1. R INSTALL ignores function names beginning with a capital letter.
2. A semicolon between if and else gives an error:
   if( ) expr1 ; else expr2
3. strings cannot be broken over two lines
4. checks on the OS have to be changed to use machine()
5. synchronize() does not exist
6. single has to be changed to double (warning only)
Then when they are finally loaded, nothing connected with models works
anymore, not even glm!
There are a number of missing functions:
1. category, as.category, is.category (the latter is in header.R of
survival4) These need to be written so that they are numeric but
level() works properly.
2. terms.inner (this is called by newsurvival4.R on l.1242 but does
not exist!) Design uses a stripped down version that calls a C
function called all_names. Any idea what this is?
3. The fortran for proportional odds calls directly the fortran
functions underlying the S versions of qr and solve. These appear to
be different modifications of linpack routines than those used in
R. The argument lists are different.

A further incompatibility is that assignments similar to the following
are often used:
Limits <- list()
Limits[["y"]] <- 1
This gives subscript out of bounds.

The S code appears to be very clean (although unreadable because not
properly indented). (This contrasts with Oswald that my son has been
trying to port for the last 6 months and that is extremely poorly
programmed.)  If anyone is interested in pursuing this further, I
shall be happy to forward the results of the 5 or 6 hours work that I
put in to it. For someone who knows S well, I do not think it would be
much work.
  Jim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=