Hi!
Here's an example how you can do such tasks using dplyr
suppressPackageStartupMessages(library(dplyr))
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.2 setosa
#> 2 4.9 3.0 1.4 0.2 setosa
#> 3 4.7 3.2 1.3 0.2 setosa
#> 4 4.6 3.1 1.5 0.2 setosa
#> 5 5.0 3.6 1.4 0.2 setosa
#> 6 5.4 3.9 1.7 0.4 setosa
iris%>%group_by(Species)%>%summarise_all(list(mean=mean,sd=sd))
#> # A tibble: 3 x 9
#> Species Sepal.Length_me… Sepal.Width_mean Petal.Length_me… Petal.Width_mean
#> <fct> <dbl> <dbl> <dbl> <dbl>
#> 1 setosa 5.01 3.43 1.46 0.246
#> 2 versic… 5.94 2.77 4.26 1.33
#> 3 virgin… 6.59 2.97 5.55 2.03
#> # … with 4 more variables: Sepal.Length_sd <dbl>, Sepal.Width_sd <dbl>,
#> # Petal.Length_sd <dbl>, Petal.Width_sd <dbl>
Created on 2021-01-18 by the reprex package (v0.3.0)
Does this help you?
For the future, or if you'd like more explicit help, I would recommend you to share a representative subset of your data in a more copy & paste friendly way, you can for example use the dput() function to do so.