I have a big data.frame called \"mat\" of 49952 obs. of 7597 variables and I\'m trying to replace NAs with zeros. Here is and example how my data.frame looks like:
Try the following:
mat %>% replace(is.na(.), 0)