[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    [R] unname() not working as stated in documentation
From:       "Richard M. Scriven" <rmscriven () gmail ! com>
Date:       2015-12-31 4:24:38
Message-ID: CADgD3AtjGrfLw4cxj1Su+LT=Eu=ZoUGReqqztU2ushcsAXvYWA () mail ! gmail ! com
[Download RAW message or body]

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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic