Re: [R] summarize_all Function

2020-10-02 Thread Jeff Reichman
Thanks Bill – got it From: Bill Dunlap Sent: Thursday, October 1, 2020 1:56 PM To: reichm...@sbcglobal.net Cc: r-help@r-project.org Subject: Re: [R] summarize_all Function The warning gives some suggestions. E.g., replace funs(sum,prod) with list(sum=sum,prod=prod). % R CMD Rscript

Re: [R] summarize_all Function

2020-10-02 Thread Jeff Reichman
Thanks Rui -Original Message- From: Rui Barradas Sent: Thursday, October 1, 2020 1:49 PM To: reichm...@sbcglobal.net; r-help@r-project.org Subject: Re: [R] summarize_all Function Hello, Any of the two will do, the first is now preferred. library(dplyr) mtcars %>% summar

Re: [R] summarize_all Function

2020-10-01 Thread Bill Dunlap
The warning gives some suggestions. E.g., replace funs(sum,prod) with list(sum=sum,prod=prod). % R CMD Rscript -e 'library(dplyr,warn.conflicts=FALSE); data.frame(X=1:3,Y=c(11,13,17)) %>% summarize_all(funs(sum,prod))' X_sum Y_sum X_prod Y_prod 1 641 6 2431 Warning message: `funs

Re: [R] summarize_all Function

2020-10-01 Thread Rui Barradas
Hello, Any of the two will do, the first is now preferred. library(dplyr) mtcars %>% summarise(across(everything(), sum)) mtcars %>% summarise_all(sum) # no need for `funs()` Hope this helps, Rui Barradas Às 18:29 de 01/10/20, Jeff Reichman escreveu: r-help Forum I'm using th