Question: Pearson’S Correlation Method In R
0
gravatar for sebabiokr
6.1 years ago by
sebabiokr10
sebabiokr10 wrote:

Dear Biostar,

I would like to perform Pearson’s correlation of OTUs taxa against metabolomics data.

i have OTUs taxa abundance and metabolomics data for each samples.

Is there any method or tutorials?

Thank you

Seba

R heatmap • 2.5k views
ADD COMMENTlink modified 6.1 years ago by Jimbou710 • written 6.1 years ago by sebabiokr10
2
gravatar for Jimbou
6.1 years ago by
Jimbou710
Germany
Jimbou710 wrote:

This website is very helpful:

http://www.statmethods.net/stats/correlations.html

and cor.test is my option of choice

http://stat.ethz.ch/R-manual/R-devel/library/stats/html/cor.test.html

For example:

cor.test(x, y,alternative = c("two.sided"),method = c("pearson"))
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by Jimbou710
1
gravatar for arno.guille
6.1 years ago by
arno.guille400
France
arno.guille400 wrote:
mat = matrix(rnorm(1000),ncol=10,nrow=100)
cor(mat)

'var', 'cov' and 'cor' compute the variance of 'x' and the covariance or correlation of 'x' and 'y' if these are vectors. If 'x' and 'y' are matrices then the covariances (or correlations) between the columns of 'x' and the columns of 'y' are computed.

ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by arno.guille400
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 789 users visited in the last hour