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] Insu scribe

2021-10-18 Thread Rui Barradas
Hello, Only you can unsubscribe from R-Help. Please see the link at the bottom of this and every R-Help e-mail. UNSUBSCRIBE is written in upper case letters. Hope this helps, Rui Barradas Às 19:59 de 18/10/21, Anne escreveu: __ R-help@r-project.org

[R] Insu scribe

2021-10-18 Thread Anne
-- Anne 耀日 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [ESS] how to connect to ODBC Driver 17

2021-10-18 Thread Stephen Bond via ESS-help
some more detail: the db is on the MS cloud called Azure and the security protocols do not allow plain text passwords in scripts, so only this interactive login will be allowed. the window that opens is a browser window titled "Windows Azure Authentication" Has anybody been able to connect to

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

[ESS] how to connect to ODBC Driver 17

2021-10-18 Thread Stephen Bond via ESS-help
Hello, This is happening on Windows 10 GUI. I need to connect via ODBC Driver 17 and the connection is set as ActiveDirectoryInteractive. I have the DSN set up. Connecting from Rgui is easy as both odbcConnect and odbcDriverConnect open a window for the user to enter the password. Under Rterm

Re: [R] Replacing NA s with the average

2021-10-18 Thread PIKAL Petr
Hi. sometimes is worth to try google first R fill NA with average resulted in https://stackoverflow.com/questions/25835643/replace-missing-values-with-col umn-mean and from that library(zoo) na.aggregate(DF) will replace all numeric NA values with column averages. Cheers Petr >

Re: [R] Rising and falling bar-plots simultaneously

2021-10-18 Thread Eliza Botto
Thanks everyone. It helped. From: Jim Lemon Sent: Monday 18 October 2021 04:01 To: Eliza Botto ; r-help mailing list Subject: Re: [R] Rising and falling bar-plots simultaneously Hi Eliza, Try this: BAS1<- structure(c(3, 4, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4,

[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 >

Re: [R] creating a new variable and merging it on the dataframe

2021-10-18 Thread Grzegorz Smoliński
Hi, If you had really just used: wbpractice %>% mutate(gap = total.food.exp-total.nfood.exp) #gen a variable and then checked by: names(wbpractice) then the problem is just with missed assignment, i.e. it should be: wbpractice <- wbpractice %>% mutate(gap = total.food.exp-total.nfood.exp)

Re: [R] creating a new variable and merging it on the dataframe

2021-10-18 Thread PIKAL Petr
Hi I cannot say anything about mutate but read.csv results in data frame you can use then wbpractice$gap <- with(wbpractice, total.food.exp-total.nfood.exp) Cheers Petr BTW, do not use HTML formating your email is a mess. > -Original Message- > From: R-help On Behalf Of Admire

[R] creating a new variable and merging it on the dataframe

2021-10-18 Thread Admire Tarisirayi Chirume
Good day colleagues. Below is a csv file attached which i am using in my analysis. hh.id hd17.perm hd17employ health.exp total.food.exp total.nfood.exp 1 2 yes 1654 23654 23655 2 2 yes 2564 265897 65984 3 6 no 2547 123311 52416 4 8 no 5698 13648 12544 5 6 no

[R] spm2: A new package for (spatial) predictive modelling

2021-10-18 Thread Jin Li
Dear all, A new package, spm2_1.1.0, for (spatial) predictive modelling has just been made available on CRAN. It is an updated and extended version of 'spm' package, by introducing some further novel functions for modern statistical methods (i.e., generalised linear models, glmnet, generalised