Today I learned

A script to filter multiple values

Author

Kevn Gilds, MPA

Published

2022-12-29

The problem

How have I not run into the problem of filtering multiple values. I was running through some scripts but could not find the solution.

Solution:

I am pretty sure I found this on a stack overflow post

dplyr::filter(stringr::str_detect(outcomes, 'something1|nextitem2|anotherthing3')) 

It worked and write this to remember!


About

Kevin is a nonprofit data professional operating out of Lakeland, Florida.
My expertise is helping nonprofits collect, manage and analyze their program data.