[R] unname() not working as stated in documentation
Richard M. Scriven
rmscriven at gmail.com
Thu Dec 31 05:24:38 CET 2015
Hi all,
In help(unname), for the "force" argument, it states that
"if true, the dimnames (names and row names) are removed even from
data.frames."
However, when I use unname() to remove all the names from mtcars, it fails.
> unname(mtcars, force = TRUE)
Error in `dimnames<-.data.frame`(`*tmp*`, value = NULL) :
invalid 'dimnames' given for data frame
This traces back to `dimnames<-.data.frame` not accepting NULL as a
replacement value. So my question is, do you think this is a bug worth
reporting as such, or simply a mistake in the documentation?
Thank you for your time.
--
*Richard M Scriven*
*Economics, **Applied Statistics*
*Undergraduate **Class of 2014*
* University of California, DavisTel: (925) 487-5034*
[[alternative HTML version deleted]]
More information about the R-help
mailing list