[R] FORTRAN in R

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Thu Aug 16 16:04:39 CEST 2001


I have tried leaps and it kind of works.

However when I tried to make it displays the variables' names instead of
displaying 1 2 3 4..., I got some error messages.

Suppose I have a data frame called myData.  There are 5 variables (H, L,
S, W, M), where M is the response variable and all the others are
explanatory variables.

I extracted M out from myData, and call the new data frame (without M) X.

Then I tried:
 leaps( X, M, names=names(X) )
   Error in leaps(X, M, names = names(X)) : couldn't find function
   "col.names<-"

If I do
  leaps( X, M )
then it works but columns in $which is displayed as 1 2 3 4 instead of H L
S W.

I also tried to use names=list(names(X)) but it still doesn't work.

Helps will be appreciated ;-)

Cheers,

Ko-Kang Wang


On Wed, 15 Aug 2001, Prof Brian Ripley wrote:

> Date: Wed, 15 Aug 2001 12:50:22 +0100 (BST)
> From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
> To: Ko-Kang Kevin Wang <kwan022 at stat.auckland.ac.nz>
> Cc: Jim Lemon <bitwrit at ozemail.com.au>, R Help <r-help at stat.math.ethz.ch>
> Subject: Re: [R] FORTRAN in R
> 
> On Wed, 15 Aug 2001, Ko-Kang Kevin Wang wrote:
> 
> > In fact I'm wondering if there is a stepwise() function in R that works
> > just as it works in Splus...I tried the stepfun library but it wasn't
> > right, that is why I decided to copy the stepwise() function from Splus
> > into R and got this problem.
> 
> No, there is nothing that works that poorly!  It has been superseded in
> S-PLUS for at least ten years.
> 
> You have leaps() and friends in package leaps that uses better algorithms,
> or step() which covers more general models (including those using th full
> power of formulae), respects hierarchies and actually optimizes a
> defensible criterion.
> 
> -- 
> Brian D. Ripley,                  ripley at 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
> 
> 

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Statistical Analysis Division Leader
Software Developers' Klub (SDK)
University of Auckland
New Zealand

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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