I am trying to select a subset of rows from a tibble by their row-wise sum values using a tidyverse pipe. Below is an example code.
library(tidyverse)
mytbl = tibble(a = 1:5, b = 1:5)
mytbl %>% .[(. %>% rowSums) > 5, ]
But this code throws a weird error.
#Error in (. %>% rowSums) > 5 :
# comparison (6) is possible only for atomic and list types
What does this mean and why am I getting this?