Thank you for pointing me to ?dissimilarity.object. I now see that N = Nominal (factor) and I = Interval scaled (numeric).
Regards. On Sun, Feb 24, 2013 at 2:36 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > On 2013-02-24 07:57, Joanna Papakonstantinou wrote: > >> I am using the iris dataset that contains mixed variables (some columns >>> are numeric and some categorical). >>> >>> iris >>>> >>> Sepal.Length Sepal.Width Petal.Length Petal.Width Species >>> 1 5.1 3.5 1.4 0.2 setosa >>> 2 4.9 3.0 1.4 0.2 setosa >>> 3 4.7 3.2 1.3 0.2 setosa >>> 4 4.6 3.1 1.5 0.2 setosa >>> . >>> . >>> . >>> >> >> I am trying to use the Gower metric so that I may specify that some >>> columns contain categorical data. >>> >>>> iris.clust<-daisy(iris, metric = "gower", stand = FALSE, type = >>>> list(factor="Species")) >>>> >>> But it is saying that the types= I, I, I, I, N >> so obviously it is not reading the variable types correctly. >> > > I don't know why you say that. Look at ?dissimilarity.object to see > what 'I' and 'N' mean. > > If you read the help page for ?daisy carefully, you'll see that your > command is equivalent to > > iris.clust(iris) > > i.e. you need not specify the metric etc. > BTW, your specification of 'type' indicates that you may have > looked at the help page a bit too hastily. > > > >> Could someone please tell me how to specify the variable types correctly? >> >> Thank you. >> Joanna >> > > Peter Ehlers > > -- ****************************************************************** *Joanna Papakonstantinou, Ph.D.* [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org 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.