반응형 n()1 (R) make a summary - group_by(),summarise() >library(ggplot2) ------------------for mpg>library(dplyr) ------------------for summarise() >mpg%>%summarise(mean_cty=mean(cty)) # A tibble: 1 x 1mean_cty 1 16.9 A summary of a group(drv) by mean_cty >drv_cty%group_by(drv)%>%summarise(mean_cty=mean(cty)) > drv_cty # A tibble: 3 x 2 drv mean_cty 1 4 14.32 f 20.03 r 14.1 A summary of groups of drv, manufacturer (4,f,r - Audi,Chevrolet, ...) by me.. 2020. 7. 22. 이전 1 다음 반응형