suppressWarnings() doesn't work with pipe operator
问题 I am trying to suppress warnings by using the suppressWarnings() function. Surprisingly, it removes warnings when used normally, but it fails to do so when you use the pipe %>% operator. Here is some example code : library(magrittr) c("1", "2", "ABC") %>% as.numeric() # [1] 1 2 NA # Warning message: # In function_list[[k]](value) : NAs introduced by coercion c("1", "2", "ABC") %>% as.numeric() %>% suppressWarnings # [1] 1 2 NA # Warning message: # In function_list[[i]](value) : NAs introduced