Question: I was wondering if anyone knows how I could keep rows that only have values <0.01 within a specific column with commas separating the values?

For instance

```
V1 V2 V3 V4 
A B C D 0.02,0.0001,0.03,0.15
D E F G 0.05
S E G A 0.02,0.01
A B C D 0.001,0.05,0.3

```

And I would keep only the columns where V4 is < 0.01 in any of the comma separated values.

```
A B C D 0.02,0.0001,0.03,0.15
A B C D 0.001,0.05,0.3

```

I appreciate the help!

Answer: 
An option with `base R` involves splitting the 'V4' by `,`, convert to numeric and check if `any` value less than 0.01 and then use that as index for subsetting

```
df1[sapply(strsplit(df1$V4, ","), function(x) any(as.numeric(x) < 0.01)),]

```
You can try this:

```
library(stringr)

#Data
df <- structure(list(V1 = c("A", "D", "S", "A"), V2 = c("B", "E", "E", 
"B"), V3 = c("C", "F", "G", "C"), V4 = c("D", "G", "A", "D"), 
    X = c("0.02,0.0001,0.03,0.15", "0.05", "0.02,0.01", "0.001,0.05,0.3"
    )), class = "data.frame", row.names = c(NA, -4L))
structure(list(V1 = c("A", "D", "S", "A"), V2 = c("B", "E", "E", 
"B"), V3 = c("C", "F", "G", "C"), V4 = c("D", "G", "A", "D"), 
    X = c("0.02,0.0001,0.03,0.15", "0.05", "0.02,0.01", "0.001,0.05,0.3"
    )), class = "data.frame", row.names = c(NA, -4L))

#Code
#Create an index
df$Index <- apply(A[,5,drop=F],1,function(x) sum(as.numeric(do.call(c,(str_split(x,','))))<0.01))
#Then filter
df1 <- df[df$Index==1,]

  V1 V2 V3 V4                     X Index
1  A  B  C  D 0.02,0.0001,0.03,0.15     1
4  A  B  C  D        0.001,0.05,0.3     1

```