cor function was giving him outputs with more columns than expected (pearson method now also produces confidence intervals?) and the existing code in the materials wasn't working properly (matrix operations were failing, essentially)
cor_pear<-df %>%
- select(-state) %>%
- cor_test(method = "pearson") %>%
- select(var1, var2, cor)
cor_spear<-df %>%
- select(-state) %>%
- cor_test(method = "spearman") %>%
- select(var1, var2, cor)
cor_diff<- cor_pear - cor_spear
Error in FUN(left, right) : non-numeric argument to binary operator
cor function was giving him outputs with more columns than expected (pearson method now also produces confidence intervals?) and the existing code in the materials wasn't working properly (matrix operations were failing, essentially)