[Rd] Unable to use names() to set names on a 'dist' object (PR#1129)
Sat, 13 Oct 2001 09:40:59 +0200
>>>>> Peter Dalgaard BSA writes:
> firstname.lastname@example.org writes:
>> I am unable to set the names on a 'dist' object using the
>> function names()
> Yup, that's a bug.
> I wonder how long it has been around. The function definition is
> function (d, n)
> if (length(n) != attr(d, "Size"))
> stop("invalid names for dist object")
> attr(d, "Labels") <- n
> but the value is passed as a named argument called "value", and it has
> been like that for ages. The fix is obvious: replace "n" with "value"
> (3 times).
I will write a test for this when I find some time ...
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: email@example.com