I'm a beginner with R and can't manage to change outliers for ALL columns in a dataset in R. I succeeded changing one column at a time with
dataset$column[dataset$column %in% boxplot.stats(dataset$column)$out] <- NA
But I have 21 columns on which I need to change the outliers for NA.
How would you do that?
How would you do it for a column range? Specific columns?