I am trying to get a correlation between two variables at the end of a pipe operation, why don't these work?
library(tidyverse)
iris %>%
map(~cor(.$Sepal.Length, .$Sepal.Width, use = "complete.obs"))
#or
iris %>%
dplyr::select(Sepal.Length, Sepal.Width) %>%
map2(~cor(.x, .y, use = "complete.obs"))
thanks