Use %in%
:
main_data2 <- main_data[ ! main_data$NAMES %in% NAMES_list, ]
More Related Contents:
- Simultaneously merge multiple data.frames in a list
- Count number of rows within each group
- Drop unused factor levels in a subsetted data frame
- Why is it not advisable to use attach() in R, and what should I use instead?
- Create an empty data.frame
- Create a group number for each consecutive sequence
- Subset data frame based on multiple conditions [duplicate]
- R – Concatenate two dataframes?
- Remove columns with zero values from a dataframe
- How to convert dataframe into time series?
- Merge unequal dataframes and replace missing rows with 0
- What can R do about a messy data format?
- Removing display of row names from data frame
- Add extra level to factors in dataframe
- Dataframe create new column based on other columns
- What is about the first column in R’s dataset mtcars?
- Last Observation Carried Forward In a data frame? [duplicate]
- finding close match from data frame 1 in data fame 2
- Combine several data frames in the global environment by row (rbind)
- Extract text after “/” in a data frame column
- Define dimensions of an empty dataframe
- use multiple columns as variables with sapply
- Deleting specific rows from a data frame
- Reshape a dataframe to long format with multiple sets of measure columns [duplicate]
- Count number of non-NA values for every column in a dataframe [duplicate]
- Count unique values for every column
- Numbers as column names of data frames
- Divide each value by the sum of values by group
- Convert all data frame character columns to factors
- Override column types when importing data using readr::read_csv() when there are many columns