Re: [R] Solved: was names(dist(mat)) gives NULL in R 2.1.0

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 06 May 2005 - 01:16:55 EST

On Thu, 5 May 2005, Elio Mineo wrote:

> Thanks to Andy Liaw to suggest me the right solution (at least for me):
>
> attributes(dist(mat))$Labels
>
> or
>
> attr(dist(mat),"Labels")

R 2.2.0 will allow labels(dist_object), which seem natural (and unlike names promises nothing about the returned object).

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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 Fri May 06 01:37:11 2005

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