This:
df[ df == "foo" ] <- NA
More Related Contents:
- How do I replace NA values with zeros in an R dataframe?
- How to replace NA values in a table for selected columns
- Omit rows containing specific column of NA
- Count NAs per row in dataframe [duplicate]
- Subset of rows containing NA (missing) values in a chosen column of a data frame
- Remove columns from dataframe where some of values are NA
- How to subset data in R without losing NA rows?
- How to delete columns that contain ONLY NAs?
- Randomly insert NAs into dataframe proportionaly
- Select last non-NA value in a row, by row
- Replace in a factor column
- Replace all NA with FALSE in selected columns in R
- Find columns with all missing values
- R: replacing NAs in a data.frame with values in the same position in another dataframe
- Move NAs to the end of each column in a data frame
- How does one reorder columns in a data frame?
- R spreading multiple columns with tidyr [duplicate]
- Unlist data frame column preserving information from other column
- Take random sample by group
- How do I delete rows in a data frame?
- Replacing values from a column using a condition in R
- Split data.frame by value
- Check whether values in one data frame column exist in a second data frame
- How do you remove columns from a data.frame?
- Deleting columns from a data.frame where NA is more than 15% of the column length [duplicate]
- DT[!(x == .)] and DT[x != .] treat NA in x inconsistently
- Return df with a columns values that occur more than once [duplicate]
- Undefined columns selected when subsetting data frame
- How to create a new variable in a data.frame based on a condition?
- Interpolating timeseries