R-beta: S compatibility

Ross Ihaka ihaka at stat.auckland.ac.nz
Fri Aug 14 23:39:29 CEST 1998

	From r-help-owner at stat.math.ethz.ch Fri Aug 14 22:21 NZS 1998
	From: Jim Lindsey <jlindsey at alpha.luc.ac.be>
	Subject: R-beta: S compatibility
	To: r-help at stat.math.ethz.ch (r-help)
	Date: Fri, 14 Aug 1998 12:24:21 +0200 (MET DST)

	Once again, I foolishly attempted a major port of S, ratfor, and
	Fortran code (hidden Markov models from an article in the latest Can
	Jr Stat) to R without access to S-Plus itself. Here are some problems
	I found before abandoning:

	1. replicating a factor does not give a factor:
	  is.factor(rep(gl(2,1,2),2)) is FALSE

I have just implemented this.  It will show up in the development version

	2. sample() does not have the option, prob=

This is a good little exercise for someone :-).  Anyone want to write a
C function which does this.  I.e. we want a function which takes a
vector of probabilities and returns the sampled values.  We probably
want with and without replacement.  Given such a function it would be
about two minutes work to integrate it into R.

	3. glm()$assign does not exist
	4. glm()$contrast is very different from S - apparently the latter is
	  a list with one member per variable instead of a copy of the options
	  in effect
	5. C() does not exist (something to do with contrasts, which are
	  apparently handled much differently in S-Plus)

I have had the contrasts stuff on my todo list for a while.  Expect
(more) compatibility soon.

	6. dummy.coef() does not exist
	7. something else I have now forgotten...

	In general, almost all aspects of model fitting in the two seem
	to be completely incompatible.

We try to be moderately clean-room.  To get particular details right
we need a clear description of what is needed.


PS: Splus (= S Version 4) for Linux is imminent (At least Bell Labs
has delivered it to MathSoft).  You might want to look into it.
r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list