[R] how to delete a matrix column

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 2 20:21:33 CET 2004


On Tue, 2 Mar 2004, Rolf Turner wrote:

> Aimin Yan wrote:
> 
> > I am new to R, How to delete a matrix column.
> 
> e.g. y <- x[,-5] deletes column 5
> 
> I was going to point out to the inquirer where this feature
> is documented --- but I can't bleedin' find it!!!
> 
> Can anyone tell me?  I tried ?"[" but got no joy that
> I could discern.

`An Introduction to R', for one.

The help page for "[" is long enough, but needs to be split/have some 
xrefs added for things like this.

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list