Re: [R] Clustering function

From: Dave Roberts <droberts_at_montana.edu>
Date: Wed 18 Jan 2006 - 07:08:23 EST

Norman,

     You're missing a step. You need to convert the data file into a 'dist' object, which is either a distance or dissimilarity matrix. This is typically done by function dist(), but may also be done by other functions which produce dist objects, like daisy() in package cluster, vegdist() in package vegan or dsvdis() in package labdsv. You then give the dist object as an argument to the hclust() function, which I believe is core R.

     Alternatively, function agnes() in package cluster produces a classification directly from a data matrix.


David W. Roberts                                     office 406-994-4548
Professor and Head                                      FAX 406-994-3190
Department of Ecology                         email droberts@montana.edu
Montana State University
Bozeman, MT 59717-3460

N. Goodacre wrote:
> Dear mailing group,
>
> I have loaded an Excel file into R by calling it ".csv" and using the
> "read.csv" function in R. However then I want to use the (limma package
> specific, I believe) function "hclust", which clusters data in a tree
> dendrogram, by similarity. However, I receive the errors msg.s: 1) "missing
> observations in cov/cor" 2) "In addition: warning message: NAs introduced
> by coercion"
>
> The excel file does have missing data slots. Do these tow messages mean
> that it has written "NA" where the missing slots were? Or is there a more
> fundamental error?
>
> thanks.
>
> -Norman
>
> ______________________________________________
> 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
>
>



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 Wed Jan 18 07:47:12 2006

This archive was generated by hypermail 2.1.8 : Wed 18 Jan 2006 - 14:08:19 EST