-3

Basically I have a .csv file that has a column of data where I only want the rows that have that given column with a certain value. Is there a way to do this?

`

1 Answers1

0

Try this:

df <- data.frame(x=c(1,3,3,4),
                 y=c(1,2,3,4))

df[df$x==3,]

Output:

  x y
2 3 2
3 3 3
www
  • 4,124
  • 1
  • 11
  • 22