In base R I can use the following code to remove/replace values throughout a dataframe (e.g., all NAs or values greater than 0.99).
df[df > 0.99] <- NA
df[is.na(df)] <- 0L
Is there a way to perform the equivalent operation using dplyr in the tidyverse?