0

How can I extract two rows (rows a and b below) from my data frame df?

df1 = df[(df$column1 == "a" & "b"),]
divibisan
  • 11,659
  • 11
  • 40
  • 58
Jed
  • 35
  • 6

1 Answers1

1

Just use the subset function: subset(df, subset = column1 %in% c("a","b"))

Regards.

lsmor
  • 4,698
  • 17
  • 38