My details:
data <- data.frame(column1 = c("A","B","C","D"), column2 = c(4, NA, NA, 1))
My pipe:
library (dplyr) data2 <- data %>% filter (grepl("A|B|D", column1))
My question is: How can I (simply) continue my channel to add a line containing a common column2 (total = 5)?
source share