1.Importação dos dados

importando a base de dados df_pokemon.

load("C:/Users/T-Gamer/Downloads/Base_de_dados-master/Base_de_dados-master/df_pokemon.RData")

Variaveis qualitativas escolhidas foram “type_2” e “egg_group_2”

df$type_2<-as.factor(df$type_2)
df$egg_group_2<-as.factor(df$egg_group_2)

2.Fazendo a tabela cruzada

tabela1<-table(df$type_2,df$egg_group_2)
tabela1
##           
##            bug dragon fairy flying ground humanshape indeterminate mineral
##   bug        0      0     0      0      0          0             0       0
##   dark       0      0     0      0      0          2             0       0
##   dragon     0      4     0      0      0          0             0       0
##   electric   0      0     0      0      0          0             1       0
##   fairy      0      0     4      0      0          0             0       1
##   fighting   0      2     0      0      0          2             0       0
##   fire       0      0     0      0      0          0             0       0
##   flying     1      5     2      4      4          0             0       0
##   ghost      0      0     0      0      0          0             0       1
##   grass      0      0     0      0      0          0             2       0
##   ground     0      3     0      0      3          0             1       0
##   ice        0      0     0      0      1          0             0       0
##   normal     0      2     0      0      0          0             0       0
##   poison     0      0     0      0      0          0             0       0
##   psychic    0      0     0      0      0          0             0       0
##   rock       0      0     0      0      3          0             0       2
##   steel      0      0     0      0      1          1             0       2
##   water      1      1     0      0      4          0             0       0
##           
##            plant water1 water2 water3
##   bug          0      0      0      1
##   dark         2      0      0      2
##   dragon       0      0      0      0
##   electric     0      0      0      0
##   fairy        2      0      0      0
##   fighting     1      0      0      0
##   fire         0      0      0      0
##   flying       4      0      0      2
##   ghost        0      0      0      0
##   grass        5      0      0      0
##   ground       1      2      0      0
##   ice          2      1      0      0
##   normal       0      0      0      0
##   poison       5      0      0      0
##   psychic      0      3      2      0
##   rock         0      0      1      3
##   steel        0      0      0      0
##   water        0      0      0      4

3.Fazendo a proporcionalidade

prop.table(tabela1,1)*100
##           
##                   bug     dragon      fairy     flying     ground
##   bug        0.000000   0.000000   0.000000   0.000000   0.000000
##   dark       0.000000   0.000000   0.000000   0.000000   0.000000
##   dragon     0.000000 100.000000   0.000000   0.000000   0.000000
##   electric   0.000000   0.000000   0.000000   0.000000   0.000000
##   fairy      0.000000   0.000000  57.142857   0.000000   0.000000
##   fighting   0.000000  40.000000   0.000000   0.000000   0.000000
##   fire                                                           
##   flying     4.545455  22.727273   9.090909  18.181818  18.181818
##   ghost      0.000000   0.000000   0.000000   0.000000   0.000000
##   grass      0.000000   0.000000   0.000000   0.000000   0.000000
##   ground     0.000000  30.000000   0.000000   0.000000  30.000000
##   ice        0.000000   0.000000   0.000000   0.000000  25.000000
##   normal     0.000000 100.000000   0.000000   0.000000   0.000000
##   poison     0.000000   0.000000   0.000000   0.000000   0.000000
##   psychic    0.000000   0.000000   0.000000   0.000000   0.000000
##   rock       0.000000   0.000000   0.000000   0.000000  33.333333
##   steel      0.000000   0.000000   0.000000   0.000000  25.000000
##   water     10.000000  10.000000   0.000000   0.000000  40.000000
##           
##            humanshape indeterminate    mineral      plant     water1
##   bug        0.000000      0.000000   0.000000   0.000000   0.000000
##   dark      33.333333      0.000000   0.000000  33.333333   0.000000
##   dragon     0.000000      0.000000   0.000000   0.000000   0.000000
##   electric   0.000000    100.000000   0.000000   0.000000   0.000000
##   fairy      0.000000      0.000000  14.285714  28.571429   0.000000
##   fighting  40.000000      0.000000   0.000000  20.000000   0.000000
##   fire                                                              
##   flying     0.000000      0.000000   0.000000  18.181818   0.000000
##   ghost      0.000000      0.000000 100.000000   0.000000   0.000000
##   grass      0.000000     28.571429   0.000000  71.428571   0.000000
##   ground     0.000000     10.000000   0.000000  10.000000  20.000000
##   ice        0.000000      0.000000   0.000000  50.000000  25.000000
##   normal     0.000000      0.000000   0.000000   0.000000   0.000000
##   poison     0.000000      0.000000   0.000000 100.000000   0.000000
##   psychic    0.000000      0.000000   0.000000   0.000000  60.000000
##   rock       0.000000      0.000000  22.222222   0.000000   0.000000
##   steel     25.000000      0.000000  50.000000   0.000000   0.000000
##   water      0.000000      0.000000   0.000000   0.000000   0.000000
##           
##                water2     water3
##   bug        0.000000 100.000000
##   dark       0.000000  33.333333
##   dragon     0.000000   0.000000
##   electric   0.000000   0.000000
##   fairy      0.000000   0.000000
##   fighting   0.000000   0.000000
##   fire                          
##   flying     0.000000   9.090909
##   ghost      0.000000   0.000000
##   grass      0.000000   0.000000
##   ground     0.000000   0.000000
##   ice        0.000000   0.000000
##   normal     0.000000   0.000000
##   poison     0.000000   0.000000
##   psychic   40.000000   0.000000
##   rock      11.111111  33.333333
##   steel      0.000000   0.000000
##   water      0.000000  40.000000
Conclusão
Podemos ver que o tipo “dragon” é o que mais aparece em ambas as tabelas, tanto de tipos de pokemon quanto de grupos de ovos. Também podemos perceber que as linhas “Dragon X Dragon” e “Normal X Dragon” são as que possuem maiores proporcionalidades.