RE: [R] names(dist(mat)) gives NULL in R 2.1.0

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Thu 05 May 2005 - 22:18:59 EST


> From: Elio Mineo
>
> Thanks, Peter.
> So, in R 2.1.0 there is no way to get names from a "dist"
> object, isn't
> there?

If you are referring to the row names of the matrix from which distances are computed, see the "Value" section of ?dist, which has:

The object has the following attributes (besides "class" equal to "dist"):

Size integer, the number of observations in the dataset. Labels optionally, contains the labels, if any, of the observations of the dataset.
[...]

Andy    

> Peter Dalgaard wrote:
>
> >Elio Mineo <elio_mineo@economia.unipa.it> writes:
> >
> >
> >
> >>In R 2.1.0 I have:
> >>
> >>
> >>
> >>>names(dist(mat))
> >>>
> >>>
> >>NULL
> >>
> >>I have tried this on Windows (precompiled binary
> distribution) and on
> >>Linux Mandrake 10.0 (R compiled from source code).
> >>Is this a bug or not?
> >>
> >>
> >
> >Not.
> >
> >>From the NEWS file:
> >
> > o The S3 methods for getting and setting names of
> "dist" objects
> > have been removed (as they provided names with a different
> > length from the "dist" object itself).
> >
> >(some side effects are fixed in 2.1.0-patched)
> >
> >
> >
>
> --
> --------------------------------------------------------------
> --------------------
> Prof. Angelo M. Mineo
> Dipartimento di Scienze Statistiche e Matematiche "S. Vianelli"
> UniversitÓ degli Studi di Palermo
> Viale delle Scienze
> 90128 Palermo
> url: http://dssm.unipa.it/elio
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 05 22:29:57 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:35 EST