Re: [R] N Sizes between Pairs of Columns using cor(, , , use = 'pairwise')

2020-01-21 Thread Doran, Harold
Now that’s brilliant! And to get a vector of counts I could extend it to rr <- crossprod(!is.na(tmp)) rr[lower.tri(rr),] Thanks, Bill! From: William Dunlap Sent: Tuesday, January 21, 2020 3:00 PM To: Doran, Harold Cc: r-help@r-project.org Subject: Re: [R] N Sizes between Pairs of Colu

Re: [R] N Sizes between Pairs of Columns using cor(, , , use = 'pairwise')

2020-01-21 Thread William Dunlap via R-help
crossprod(!is.na(tmp)) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Jan 21, 2020 at 11:56 AM Doran, Harold wrote: > I'm trying to find an efficient way to find the N size on correlations > produced when using the pairwise option in cor(). > > Here is a sample to illustrate: > > ### Cre

[R] N Sizes between Pairs of Columns using cor(, , , use = 'pairwise')

2020-01-21 Thread Doran, Harold
I'm trying to find an efficient way to find the N size on correlations produced when using the pairwise option in cor(). Here is a sample to illustrate: ### Create a sample data frame tmp <- data.frame(v1 = rnorm(10), v2 = rnorm(10), v3 = rnorm(10), v4 = rnorm(10)) ### Create some random miss