Re: [R] cor() btwn columns in two matrices - no complete element pairs

2008-08-16 Thread rcoder
, August 15, 2008 9:45 AM > An: r-help@r-project.org > Betreff: [R] cor() btwn columns in two matrices - no complete element > pairs > > > Hi everyone, > > I'm trying to calculate correlation coefficients between corresponding > columns in two matrices with identical

Re: [R] cor() btwn columns in two matrices - no complete element pairs

2008-08-16 Thread Daniel Malter
August 15, 2008 9:45 AM An: r-help@r-project.org Betreff: [R] cor() btwn columns in two matrices - no complete element pairs Hi everyone, I'm trying to calculate correlation coefficients between corresponding columns in two matrices with identical dimensions but different data. The prob

[R] cor() btwn columns in two matrices - no complete element pairs

2008-08-15 Thread rcoder
Hi everyone, I'm trying to calculate correlation coefficients between corresponding columns in two matrices with identical dimensions but different data. The problem is that the matrices contain NAs in different locations. I am using the following code to try to calculate correlations between com

Re: [R] cor() btwn columns in two matrices - no complete element pairs

2008-08-15 Thread rcoder
Is there any way to increment the loop when the error occurs, returning an NA in the results matrix. I have included an if starement to only calculate cor() when columns are !all(is.na()), but I still exit out with this error, albeit after some loops through the matrix - i.e. when the condition is