Dear Tobias, >From ?cor.test: # Data set x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1) y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
# Including text res=cor.test(x, y, method = "pearson") res # Just the p.value res$p.value Also, you might be interested in this<http://www.nabble.com/Re:-applying-cor.test-to-a-(m,-n)-matrix---SUMMARY-to17150239.html#a17150239>post. HTH, Jorge On Wed, Sep 3, 2008 at 12:20 PM, Tobias Binz <[EMAIL PROTECTED] > wrote: > Hi list > > Is there a possibility to filter certain values out of an R output? > > In my case: I want to create a vector of p-values in a for loop that > invokes for every increment cor.test() on two vectors. > > I haven't found a way yet to tell cor.test() to only return the p-values > instead of the whole text. > > Thanks, > Tobi > > ______________________________________________ > 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. > [[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.