if I try as.dist I get the following error:
On Thu, 2010-09-02 at 09:57 -0400, Sarah Goslee wrote:
> > mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
> > as.dist(cor(mydata))
>x1 x2
> x2 -0.5960396
> x3 0.3973597 0.500
print(xtable(as.dist(cor(mydata)),digits=3)
try lower.tri
and see
??lower.tri
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034
steve_fried...@nps.gov
Office (305) 224 - 4282
Fax (305) 224 - 4147
Like this?
> mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
> as.dist(cor(mydata))
x1 x2
x2 -0.5960396
x3 0.3973597 0.500
Sarah
On Thu, Sep 2, 2010 at 9:51 AM, Olga Lyashevska wrote:
> Dear all,
>
> mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
> cor(
Dear all,
mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
cor(mydata)
x1 x2x3
x1 1.000 -0.5960396 0.3973597
x2 -0.5960396 1.000 0.500
x3 0.3973597 0.500 1.000
I wonder if it is possible to fill only lower triangle of this
correlation matr
4 matches
Mail list logo