load("~/Documentos/Base_de_dados-master/df_pokemon.RData")var(df$attack)## [1] 837.3524
sd(df$attack)## [1] 28.93704
mean(df$attack)## [1] 74.85376
library(dplyr)##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(flextable)
library(reactable)df %>% select(attack, type_1) %>%
group_by(type_1) %>%
summarise(Media=round(mean(attack),2),
Desvio.padrao=round(sd(attack),2)) %>%
flextable() %>% theme_vader()type_1 | Media | Desvio.padrao |
bug | 65.22 | 30.74 |
dark | 86.25 | 24.34 |
dragon | 102.62 | 29.64 |
electric | 67.78 | 25.15 |
fairy | 61.53 | 29.75 |
fighting | 94.72 | 27.66 |
fire | 81.61 | 25.30 |
flying | 71.67 | 42.52 |
ghost | 66.65 | 25.29 |
grass | 70.91 | 24.08 |
ground | 91.30 | 28.62 |
ice | 70.70 | 25.94 |
normal | 71.73 | 29.30 |
poison | 74.68 | 19.63 |
psychic | 60.22 | 30.77 |
rock | 88.17 | 32.58 |
steel | 83.55 | 24.61 |
water | 71.05 | 25.03 |
boxplot(attack~type_1, data=df,
col=c("purple", "orange", "blue", "green", "red", "pink"),
horizontal = F,
main= "Bloxplot do attack por type_1")