0

I want to remove rows from df with status invalid

df_new<-subset(df, select = df$STATUS == "VALID")

It says that I lack a column. Is it a way to do that?

1 Answers1

1

Select only rows matching the condition in this way:

df_new<-df[df$STATUS == "VALID",]

Condition df$STATUS == "VALID" will provide a list of T/F used to select only correct rows.

Terru_theTerror
  • 4,788
  • 2
  • 17
  • 37