The question replace NA in a dplyr chain results into the solution
dt %.% group_by(a) %.% mutate(b = ifelse(is.na(b), mean(b, na.rm = T), b))
with dplyr. I want to impute all colums with dplyr chain. There is no single column to group by, rather I want all numeric columns to have all NAs replaced by the means such as column means.
What is the most elegant way to replace all NAs with column means with tidyverse/dp?