Dear Group, I am calculating correlation coeff.
between two populations. After calculating the
cor.coefs I want to represent them as a matrix file.
a b c d
A 1 0 1 1
B 1 1 1 1
C 1 0 1 0
D 0 1 1 1
could any one please help me how can i acheive this:
> dim(e1)
[1] 22283 60
> dim(e2)
[1] 22283 158
> sink("old_new.txt")
>round(cor(cbind(e1,e2),use="complete.obs"))
>sink()
Currently this is the way my result looksL
a
A 1
B 1
C 1
D 0
b
A 0
B 1
C 0
D 1
I want to see my result as:
a b c d
A 1 0 1 1
B 1 1 1 1
C 1 0 1 0
D 0 1 1 1
thankyou
srini
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html