# Re: [R] calculating dissimilarities in R

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Tue 26 Sep 2006 - 07:55:50 GMT

Hi Elvina,

>>>>> "Elvina" == Elvina Payet <virgin@seychelles.sc> >>>>> on Tue, 26 Sep 2006 05:48:01 GMT writes:

```    Elvina> ,A (BDear All,
Elvina> I’ve got a statistical question on calculating
Elvina> dissimilarities in R.
Elvina> I want to calculate the different types of dissimilarities
Elvina> on the ‘flower’ dataset found in the package
Elvina> ‘cluster’. Flower is a data frame with 18 observations
Elvina> on 8 variables. Variable 1 and 2 are binary, variable 3 is
Elvina> asymmetric binary, variable 4 is nominal, variable 5 and 6
Elvina> are ordered and variable 7 and 8 are interval scaled.

```

Elvina> Commands to load the dataset in R.

> library(cluster)
> data(flower)

or data(flower, package = "cluster")

```    Elvina> What are the different types of dissimilarities that can be
Elvina> calculated on such a dataset?
Elvina> Do I need to group the types of variables first i.e. all
Elvina> binary together then run the calculation?  Do I use
Elvina> dissimilarity indices such as Jaccard or should it be
Elvina> classification function such as ‘daisy’ which should be
Elvina> used?

```

Yes, you should use daisy() to calculate dissimilarities, particularly when you are interested in the difference between symmetric and asymmetric binary.

Do read help(daisy) and look at its examples.

[.........]

```    virgin> ______________________________________________

[.........]
```

```    virgin> http://www.R-project.org/posting-guide.html
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```

virgin> and provide commented, minimal, self-contained, reproducible code.

Regards,
Martin Maechler, ETH Zurich

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 and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 26 17:58:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 26 Sep 2006 - 08:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.