Hi, I raised this question @ stack overflow and got below partial answer. Hope this mailing list can help on rest to complete.
library(dplyr) library(tidyr) input <- "1.8 - versicolor" temp <- data.frame(input = input) %>% tidyr::separate(input, c("Petal.Width", "Species"),sep = " - ", convert = TRUE) filtered <- dplyr::filter(iris, iris$Petal.Width %in% temp$Petal.Width) This work fine but my input is "A001 - Description1" and I get "Error: operations are possible only for numeric, logical or complex types". even I tried with convert as FALSE. Any suggestion? Is there any alternative package for the solution? Thanks ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.