Skip to content

cor() function output possibly changed #32

Description

@mvanrongen

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions