Search
 
SCRIPT & CODE EXAMPLE
 

R

use summarize multiple columns r

library(dplyr)

df %>% group_by(grp) %>% summarise(across(everything(), list(mean)))
#> # A tibble: 3 x 5
#>     grp     a     b     c     d
#>   <int> <dbl> <dbl> <dbl> <dbl>
#> 1     1  3.08  2.98  2.98  2.91
#> 2     2  3.03  3.04  2.97  2.87
#> 3     3  2.85  2.95  2.95  3.06
Comment

PREVIOUS NEXT
Code Example
R :: how to read a vector input in r 
R :: reverse string in r 
R :: r concatenate data frame 
R :: r dataframe append row 
R :: nls in r 
R :: r remove row dataframe 
R :: how to read csv file in r 
R :: write text r 
R :: reorder levels of a factor in r 
R :: filter na in r 
R :: r replace space with 
R :: mutate in r if else 
R :: r as.numeric all columns except 
R :: %in% r 
R :: infinite in r 
R :: r remove column by index 
R :: How to extract NA´s from a column? in R 
R :: Score pairs of records probabilistically in r 
R :: generate pair in r 
R :: dplyr to vector 
R :: hypergeometric distribution on r 
R :: predict y given model in r 
R :: conditional mean statement r 
Rust :: rust create bigint from string 
Rust :: linking with `link.exe` failed: exit code: 1189 
Rust :: push and item to vector rust 
Rust :: armanriazi•rust•error•E0282•type annotations needed 
Rust :: How to make Rust panic ? 
Rust :: armanriazi•rust•error•E0277•the size for values of type `str` cannot be known at compilation time 
Rust :: rust fill vector with range 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =