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 add columns to a flextable in r 
R :: insert a png in R 
R :: prediction of linear model at a single point in R 
R :: R create sequence of date each quarters 
R :: extract hyperlinks in r 
R :: barplot_spacewidth 
R :: how to make date column index in R 
R :: r predict type 
R :: how to increment dates inside a for loop in r 
R :: required in r 
R :: r select columns by name 
R :: R test if variable is NA 
R :: SSL certificate problem in R 
R :: ISO 2 letter country code in r 
R :: legend in r 
Rust :: read file contents in rust 
Rust :: convert string to i32 rust 
Rust :: rust null 
Rust :: rust concatenate strings 
Rust :: rust colorful terminal 
Rust :: armanriazi•rust•pattern•design•interior•mutability 
Rust :: does rust support classes 
Rust :: convert path to pathbuf 
Rust :: rust create derive trait 
Rust :: get value from option rust 
Rust :: rust how to create array with the same value 
Rust :: rust vec length 
Lua :: lowercase lua 
Lua :: roblox tween 
Lua :: roblox key pressed script 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =