  You should reply to the list, not just me, and even more because I 
cannot really help you!!

My guess (but I don't know this package, and even less this function) is 
that pvclust() is expecting a matrix as the first argument. However, 
"cluster" is no data, it is a function. Why, I don't know. Take a closer 
look at ?pvclust, especially the "usage", "arguments" and "examples" parts.

HTH,
Ivan




-------- Message original --------
Sujet: 	RE: pvclust function
Date : 	Mon, 9 Aug 2010 10:52:30 +0100
De : 	Holt, Hannah Rebecca <hholt@rvc.ac.uk>
Pour : 	<ivan.calandra@uni-hamburg.de>



Sorry Ivan,

Thanks for your tips the output from str(cluster) is;

function (file, header = FALSE, sep = "", quote = "\"'", dec = ".",
     row.names, col.names, as.is = !stringsAsFactors, na.strings = "NA",
     colClasses = NA, nrows = -1, skip = 0, check.names = TRUE,
     fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE,
     comment.char = "#", allowEscapes = FALSE, flush = FALSE,
     stringsAsFactors = default.stringsAsFactors(), fileEncoding = "",
     encoding = "unknown")

I am not sure how to interpret this!

Kind Regards,

Hannah

-----Original Message-----
From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org] On Behalf Of Ivan Calandra
Sent: 09 August 2010 10:40
To: r-help@r-project.org
Subject: Re: [R] (no subject)

   Hi Hannah,

First, don't forget to add a subject to your email!
Second, the best way to share data is to copy/paste the output from the
dput() function into the email.

I have never used pvclust, but the error tells you that your object "cluster" is not a matrix.
What does str(cluster) return?
You may think it's a matrix, but depending on how you've created it, it might be a data.frame or something else.
str() is a very useful function.

HTH,
Ivan

Le 8/9/2010 11:22, Holt, Hannah Rebecca a écrit :
>  Hi there,
>
>
>
>  I have been trying to use the "pvclust" package but have been having
>  some difficulties. This is the first time I have used R so I am sure
>  the mistake I am making is a basic one. The data I have is a distance
>  matrix and I have been using the command; fit<- pvclust(cluster,
>  nboot=1000,
>  method.dist="euclidean") to try and perform hierarchical clustering
>  with bootstrapped p-values, but I get the error message; Error in
>  t.default(x) : argument is not a matrix. I guess there is a problem
>  with the way the data is laid out, do you know how the data should be
>  displayed in order to get the command to work (the data I am using I
>  have pasted below), I have tried various methods of organising it!
>
>
>
>             V1         V2         V3        V4
>
>  1 0.00000000 0.03162278 0.05830952 0.1315295
>
>  2 0.03162278 0.00000000 0.06000000 0.1627882
>
>  3 0.05830952 0.06000000 0.00000000 0.1627882
>
>  4 0.13152946 0.16278821 0.16278821 0.0000000
>
>
>
>  Any help you could give me would be greatly appreciated.
>
>
>
>  Kind Regards,
>
>
>
>  Hannah
>
>
>
>
>
>
>  	[[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.
>

--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum Abt. Säugetiere Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php


	[[alternative HTML version deleted]]




	[[alternative HTML version deleted]]

