Re: [R] Replacing NA s with the average

2021-10-19 Thread Martin Maechler
> Richard O'Keefe > on Tue, 19 Oct 2021 14:22:53 +1300 writes: > It *sounds* as though you are trying to impute missing data. > There are better approaches than just plugging in means. > You might want to look into CALIBERrfimpute or missForest. Yes, indeed! Put even

Re: [R] Replacing NA s with the average

2021-10-18 Thread Richard O'Keefe
It *sounds* as though you are trying to impute missing data. There are better approaches than just plugging in means. You might want to look into CALIBERrfimpute or missForest. On Tue, 19 Oct 2021 at 01:39, Admire Tarisirayi Chirume wrote: > > Good day colleagues. Below is a csv file attached

Re: [R] Replacing NA s with the average

2021-10-18 Thread Rui Barradas
Hello, Please don't post in HTML, post in plain text like the posting guide asks for. Your data is unreadable. Here are two test data sets, one with all columns numeric, the other with some columns numeric. wbpractice1 <- mtcars # all columns are numeric wbpractice2 <- iris# not all

Re: [R] Replacing NA s with the average

2021-10-18 Thread PIKAL Petr
> -Original Message- > From: R-help On Behalf Of Admire Tarisirayi > Chirume > Sent: Monday, October 18, 2021 2:39 PM > To: Jim Lemon > Cc: r-help mailing list > Subject: [R] Replacing NA s with the average > > Good day colleagues. Below is a csv file attached which i

[R] Replacing NA s with the average

2021-10-18 Thread Admire Tarisirayi Chirume
Good day colleagues. Below is a csv file attached which i am using in my > analysis. > > > > household.id > > hd17.perm > > hd17employ > > health.exp > > total.food.exp > > total.nfood.exp > > 1 > > 2 > > yes > > 1654 > > 23654 > > 23655 > > 2 > > 2 > > yes > > NA > > NA > > 65984 >