I have a dataframe with two columns such as:
> df
Col1 Col2
1,2,3 1
2,3 2
3 3
4 3
4,5 123
12 0
32 0
> class(df$Col1)
[1] "list"
> class(df$Col2)
[1] "integer"
>dput(df)
structure(list(Col1 = list(c(1,2,3), c(2,3), 3, 4, c(4,5), 12, 32),
Col2 = c(1L, 2L, 3L, 3L, 123L, 0L, 0L),..., class=data.frame)
How do I create a subset of df with only the rows where Col1 contains 2 or 3? IE:
> dfss
Col1 Col2
1,2,3 1
2,3 2
3 3
Thank you.