[Solved] Extract rows based on only one column using R [closed]
Tried to create your data using the following: df <- data.frame(col1 = c(1,1,2,2,1,1,2,2), col2 = c(34,34,342,23,34,34,342,23), col3 = c(3,4,3,4,3,4,3,4)) And, if you wish to subset based on only one column, you can use @kyle-marsh solution > df[df$col1 == 1, ] col1 col2 col3 1 1 34 3 2 1 34 4 5 1 34 3 … Read more