Thanks to Andy Liaw to suggest me the right solution (at least for me): attributes(dist(mat))$Labels or attr(dist(mat),"Labels") Bye, Elio -- ---------------------------------------------------------------------------------- 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
Prof Brian Ripley
2005-May-05 15:16 UTC
[R] Solved: was names(dist(mat)) gives NULL in R 2.1.0
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 at 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