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 at 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 at 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
>
>