Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.61.0505051616020.10592@gannet.stats>
Date: 2005-05-05T15:16:55Z
From: Brian Ripley
Subject: Solved: was names(dist(mat)) gives NULL in R 2.1.0
In-Reply-To: <427A238C.5010308@economia.unipa.it>

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