-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
The problem
correlate seems do not support two input dataframe with same rowsize and different colsize, which works in base cor function.
Reproducible example
## copy your code to the clipboard and run:
library(tidyverse)
library(corrr)
iris.sub1 <- iris %>% select (Sepal.Length)
iris.sub2 <- iris %>% select (Sepal.Width, Petal.Length, Petal.Width)
correlate (iris.sub1, iris.sub2)
#> Correlation computed with
#> • Method: 'pearson'
#> • Missing treated using: 'pairwise.complete.obs'
#> Error in `as_cordf()`:
#> ! Input object x is not a square.
cor (iris.sub1, iris.sub2)
#> Sepal.Width Petal.Length Petal.Width
#> Sepal.Length -0.1175698 0.8717538 0.8179411
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior