psychbruce / bruceR

📦 BRoadly Useful Convenient and Efficient R functions that BRing Users Concise and Elegant R data analyses.
https://psychbruce.github.io/bruceR/
GNU General Public License v3.0
167 stars 36 forks source link

receiving error "object 'magrittr_pipe' not found" #10

Closed baixx062 closed 2 years ago

baixx062 commented 3 years ago

When I run the following code,

lm1=lm(Temp ~ Month + Day, data=airquality) lm2=lm(Temp ~ Month + Day + Wind + Solar.R, data=airquality) model_summary(lm1) model_summary(lm2) model_summary(list(lm1, lm2)) model_summary(list(lm1, lm2), std=TRUE, digits=2) model_summary(list(lm1, lm2), file="OLS Models.doc")

I received the following error Error in output %>% stringr::str_replace_all(" ", "") %>% stringr::str_replace_all("-", : object 'magrittr_pipe' not found

Can you please help?

psychbruce commented 3 years ago

Hi, another user also met the same problem several days ago, but the function runs good for most of other users. Indeed, R CMD check, CRAN automatic test (see https://cran.r-project.org/web/checks/check_results_bruceR.html), and Travis CI test for Linux system (see https://travis-ci.com/github/psychbruce/bruceR) never report this bug. I don't know where the problem is. The function also runs normal on my own computer. I suggest updating R and all R packages and restarting RStudio.

psychbruce commented 3 years ago

BTW, this error is related to the print_table() function, which uses some %>% in the code. But I have imported %>% into bruceR. The error you reported is unlikely to happen theoretically. Please let me know how you work it out.

baixx062 commented 3 years ago

Thank you very much! Updating all packages etc worked for me. By the way, did I miss it or does GLM_summary have the ability to generate a table in either ms doc or excel?

psychbruce commented 3 years ago

Thanks for sharing this information!

Not yet. See https://github.com/psychbruce/bruceR#function-output for a list of functions that currently support MS Word output. In the future, I would add the option of Word output to as many functions as possible in bruceR.