QE <- load("C:/Users/17988111701/Downloads/df_pokemon.Rdata")
tail(df$height)
## [1] 20 5 15 30 58 50
## [1] 20 5 15 30 58 50
summary(df)
## id pokemon species_id height
## Min. : 1.0 Length:718 Min. : 1.0 Min. : 1.00
## 1st Qu.:180.2 Class :character 1st Qu.:180.2 1st Qu.: 6.00
## Median :359.5 Mode :character Median :359.5 Median : 10.00
## Mean :359.5 Mean :359.5 Mean : 11.41
## 3rd Qu.:538.8 3rd Qu.:538.8 3rd Qu.: 14.00
## Max. :718.0 Max. :718.0 Max. :145.00
## weight base_experience type_1 type_2
## Min. : 1.0 Min. : 36.00 Length:718 Length:718
## 1st Qu.: 95.0 1st Qu.: 65.25 Class :character Class :character
## Median : 280.0 Median :147.00 Mode :character Mode :character
## Mean : 568.2 Mean :141.55
## 3rd Qu.: 609.5 3rd Qu.:177.00
## Max. :9500.0 Max. :608.00
## attack defense hp special_attack
## Min. : 5.00 Min. : 5.00 Min. : 1.00 Min. : 10.00
## 1st Qu.: 53.00 1st Qu.: 50.00 1st Qu.: 50.00 1st Qu.: 45.00
## Median : 73.00 Median : 65.00 Median : 65.00 Median : 65.00
## Mean : 74.85 Mean : 70.67 Mean : 68.37 Mean : 68.47
## 3rd Qu.: 95.00 3rd Qu.: 85.00 3rd Qu.: 80.00 3rd Qu.: 90.00
## Max. :165.00 Max. :230.00 Max. :255.00 Max. :154.00
## special_defense speed color_1 color_2
## Min. : 20.00 Min. : 5.00 Length:718 Length:718
## 1st Qu.: 50.00 1st Qu.: 45.00 Class :character Class :character
## Median : 65.00 Median : 65.00 Mode :character Mode :character
## Mean : 69.09 Mean : 65.72
## 3rd Qu.: 85.00 3rd Qu.: 85.00
## Max. :230.00 Max. :160.00
## color_f egg_group_1 egg_group_2 url_image
## Length:718 Length:718 Length:718 Length:718
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## x y
## Min. :-49.152 Min. :-45.793
## 1st Qu.:-17.695 1st Qu.:-17.293
## Median : 0.705 Median : -0.628
## Mean : 0.000 Mean : 0.000
## 3rd Qu.: 15.905 3rd Qu.: 18.155
## Max. : 53.142 Max. : 46.593
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
##
## 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)
## Warning: package 'flextable' was built under R version 4.2.3
library(janitor)
## Warning: package 'janitor' was built under R version 4.2.3
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
tabela = table(df$height)
#proporção dos Pokemons (para altura)
janitor::tabyl(df, height) %>%
adorn_percentages("row") %>%
adorn_pct_formatting(digits = 2) %>%
adorn_ns %>% flextable() %>% theme_tron()
## Warning in adorn_ns(.): adorn_ns() is meant to be called on a two_way tabyl;
## consider combining columns of a one_way tabyl with tidyr::unite()
height | n | percent |
|---|---|---|
1 | 1 (2) | 0.14% (0.002785515) |
2 | 1 (13) | 0.14% (0.018105850) |
3 | 1 (45) | 0.14% (0.062674095) |
4 | 1 (56) | 0.14% (0.077994429) |
5 | 1 (55) | 0.14% (0.076601671) |
6 | 1 (66) | 0.14% (0.091922006) |
7 | 1 (33) | 0.14% (0.045961003) |
8 | 1 (43) | 0.14% (0.059888579) |
9 | 1 (32) | 0.14% (0.044568245) |
10 | 1 (58) | 0.14% (0.080779944) |
11 | 1 (36) | 0.14% (0.050139276) |
12 | 1 (45) | 0.14% (0.062674095) |
13 | 1 (27) | 0.14% (0.037604457) |
14 | 1 (29) | 0.14% (0.040389972) |
15 | 1 (41) | 0.14% (0.057103064) |
16 | 1 (23) | 0.14% (0.032033426) |
17 | 1 (20) | 0.14% (0.027855153) |
18 | 1 (16) | 0.14% (0.022284123) |
19 | 1 (11) | 0.14% (0.015320334) |
20 | 1 (19) | 0.14% (0.026462396) |
21 | 1 (7) | 0.14% (0.009749304) |
22 | 1 (6) | 0.14% (0.008356546) |
23 | 1 (2) | 0.14% (0.002785515) |
24 | 1 (1) | 0.14% (0.001392758) |
25 | 1 (4) | 0.14% (0.005571031) |
26 | 1 (1) | 0.14% (0.001392758) |
27 | 1 (2) | 0.14% (0.002785515) |
28 | 1 (1) | 0.14% (0.001392758) |
29 | 1 (1) | 0.14% (0.001392758) |
30 | 1 (2) | 0.14% (0.002785515) |
32 | 1 (2) | 0.14% (0.002785515) |
33 | 1 (1) | 0.14% (0.001392758) |
35 | 1 (2) | 0.14% (0.002785515) |
37 | 1 (1) | 0.14% (0.001392758) |
38 | 1 (1) | 0.14% (0.001392758) |
40 | 1 (1) | 0.14% (0.001392758) |
42 | 1 (1) | 0.14% (0.001392758) |
45 | 1 (2) | 0.14% (0.002785515) |
50 | 1 (1) | 0.14% (0.001392758) |
52 | 1 (1) | 0.14% (0.001392758) |
54 | 1 (1) | 0.14% (0.001392758) |
58 | 1 (1) | 0.14% (0.001392758) |
62 | 1 (1) | 0.14% (0.001392758) |
65 | 1 (1) | 0.14% (0.001392758) |
70 | 1 (1) | 0.14% (0.001392758) |
88 | 1 (1) | 0.14% (0.001392758) |
92 | 1 (1) | 0.14% (0.001392758) |
145 | 1 (1) | 0.14% (0.001392758) |
#media
mean(df$height)
## [1] 11.40669
#mediana
median(df$height)
## [1] 10
#desvio padrão
sd(df$height)
## [1] 10.31993
#media
mean(df$weight)
## [1] 568.1657
#mediana
median(df$weight)
## [1] 280
#desvio padrão
sd(df$weight)
## [1] 901.1062
tabela = table(df$height)
barplot(tabela, main = "alturas dos pokemons",
col=c("yellow","blue","orange","green"), beside = TRUE,
legend.text = rownames(tabela),
args.legend = list(x = "topleft"))