[Rd] function to remove attributes?
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Tue Jan 30 10:38:28 CET 2007
On Tue, 30 Jan 2007, Tamas K Papp wrote:
> Hi,
>
> I would like to know if there is a compact way to remove attributes
> from an object. I know attributes(obj) <- NULL works, but I wonder if
> there is something similar to unclass or unname. RSiteSearch didn't
> reveal anything.
as.vector is usually used for this purpose, but note the caveat on the help
page. (And if you have a classed object you probably do not want to remove
all attributes, since class is one.)
--
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-devel
mailing list