[Rd] Unable to use names() to set names on a 'dist' object (PR#1129)

kleiweg@let.rug.nl kleiweg@let.rug.nl
Fri, 12 Oct 2001 23:36:15 +0200 (MET DST)


I am unable to set the names on a 'dist' object using the
function names()


> require(mva)
Loading required package: mva
[1] TRUE
> a <- matrix(nrow=3, ncol=3)
> a[row(a) > col(a)] <- 1:3
> b <- as.dist(a)
> names(b) <- c("X", "Y", "Z")
Error in "names<-.dist"(*tmp*, value = c("X", "Y", "Z")) :
        unused argument(s) (value ...)
> attr(b, "Labels") <- c("X", "Y", "Z")
> names(b)
[1] "X" "Y" "Z"
> b
  X Y
Y 1
Z 2 3


--please do not edit the information below--

Version:
 platform = i586-pc-linux-gnu
 arch = i586
 os = linux-gnu
 system = i586, linux-gnu
 status =
 major = 1
 minor = 3.1
 year = 2001
 month = 08
 day = 31
 language = R

Search Path:
 .GlobalEnv, package:mva, package:ctest, Autoloads, package:base


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._