search for: summarise_all

Displaying 4 results from an estimated 4 matches for "summarise_all".

2020 Oct 01
0
summarize_all Function
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 the dplyr:: summarize_all(funs(sum)) function and am receiving a > warning message that the `funs()` is deprecated as of dplyr 0....
2018 Mar 22
1
Calculate weighted proportions for several factors at once
...(prop2=n/sum(n)) %>% left_join(df2, by='group') # I would like to do something like the following (which does of course not work): my_fun <- function(x,wt){ freq1 <- dplyr::count(x, wt=wt) prop1 <- freq1 / sum(freq1) return(prop) } df1 %>% group_by(group) %>% summarise_all(.funs=my_fun(.), .vars=c('var1', 'var2')) ############################################################ Best regards, Erich [[alternative HTML version deleted]]
2020 Oct 01
4
summarize_all Function
r-help Forum I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a warning message that the `funs()` is deprecated as of dplyr 0.8.0. Ok what should I be using to summarize all columns by sum? Jeff [[alternative HTML version deleted]]
2017 Dec 29
3
Help with script
Hello there. Happy new year for everyone! I need help with a table. This table contains 300 rows and 192 columns. Being the first column the ID of my samples that can have several observations. I need to generate e NEW table that contains a single ID with the sum of the observations by columns: For example: Example ID?? A??? B? ? C? ? D? ? E? ? F? ? G.... 191 columns a1?? 0??? 0??? 0? ? 1???