corrr icon indicating copy to clipboard operation
corrr copied to clipboard

Doesn't work with 630 columns

Open anthonypiccolo opened this issue 6 years ago • 3 comments

Hi all, I have 630 columns and can't get it to work. My code is;


library(corrr)

brand_data <- read.csv("data.csv", header = TRUE)

df <- correlate(brand_data)

df %>% fashion()

df %>% network_plot(min_cor=0)
 
df %>% rplot

The error is Error in stats::cmdscale(abs(distance)) : NA values not allowed in 'd'

However, when I run;

df <- brand_data %>% correlate() %>% focus(var1, var2, var3, var4, mirror = TRUE)

It works just fine. Is this due to a limitation in the amount of columns corrr can process?

anthonypiccolo avatar Aug 14 '19 04:08 anthonypiccolo

Hi, can you try?

df %>%
  select_if(is.numeric) %>%
  filter_all(all_vars(!is.na(.) == TRUE)) %>%
  correlate()

edgararuiz-zz avatar Aug 14 '19 13:08 edgararuiz-zz

filter_all(all_vars(!is.na(.))) %>% correlate() works

 filter_all(all_vars(!is.na(.) == TRUE)) %>%
  correlate()

doesnt

fahadshery avatar Sep 17 '19 15:09 fahadshery

This reprex hangs:

library(corrr)
library(dplyr)
data(pd_speech, package = "modeldata")

df <- correlate(pd_speech %>% select(-class))

corr_info <- df %>% fashion()

corr_network <- df %>% network_plot(min_cor=0)

corr_plot <- df %>% rplot

topepo avatar Apr 03 '20 15:04 topepo