Skip to content

add "select" to subset docs (PR#6710)

2 messages · ivo welch, Brian Ripley

#
Full_Name: ivo welch
Version: current
OS: linux
Submission from: (NULL) (130.132.33.212)



* In the ?subset page, please add

      subset( dataframe, select= c(-column1,-column2) )

       returns a dara frame that is without columns 1 and 2 .

* Also, in ?lm, it would be nice to add a few more words about how to get a
residuals vector of the same length as the variable vectors, even if there are
NAs.  (I know how to do this in one way, but this may not be the right
recommended way.)

I figure that I can help with suggestions for the docs more than with the
substance, being an R learner myself.  It's a truly amazing language.

regards,

/ivo
#
On Sun, 28 Mar 2004 ivo.welch@yale.edu wrote:

            
Well, why?  select = -c(column1, column2) would be more sensible, but as 
it says

     This allows
     the use of the standard indexing conventions so that for example
     ranges of columns can be specified easily.

you are adding nothing which is not already there (except perhaps that you 
have not understood `An Introduction to R').
That's on the ?residuals page where it belongs.  It is also on page 141 of 
MASS4, and we would all benefit if you would take the time to read that 
volume thoroughly.
Please don't misuse R-bugs for this purpose.  Someone has manually to deal 
with your reports, and we have very limited resources.