-
Notifications
You must be signed in to change notification settings - Fork 0
/
10 - Bonus track.R
190 lines (124 loc) · 5.46 KB
/
10 - Bonus track.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
----##librerias-----
library(xtable)
library(sqldf)
library(corrplot)
library(scatterplot3d)
library(rgl)
library(foreign)
library(MASS)
library(usdm) #evaluar vif
library(CombMSC)
library(ggplot2)
library(caret)
library(car)
library(ellipse)
library(QuantPsyc)
library(leaps)
library(xlsx)
library(dummies)
library(ggcorrplot)
library(fmsb)
library(reshape2)
library(readxl) #Para leer los archivos de excel
library(psych) #Para calcular las estadísticas por grupo
library(nortest) #Para hacer las pruebas de hipótesis de normalidad
library(lawstat) #Prueba de Levene
library(reshape) #Manejo de datos
library(foreign)
library(dplyr)
library(FactoMineR)
library(factoextra)
library("aplpack")
library(fmsb)
options(scipen = 999)
----#star plot de jugadores----
#subset jugadores videla, acuña, aued, gastón diaz, marcelo meli,pulpito gonzalez,vismara, cerro
Jugadores_bonus <- jugadores_agr %>% filter(jugador %in% c("Meli,Cesar Marcelo","Videla,Ezequiel","Acuña,Marcos","Diaz,Ricardo Gaston","Aued,Luciano Roman","Gonzalez,Diego Hernan","Cerro,Francisco"))
Jugadores_bonus <- Jugadores_bonus[,c(23:37)]
-----#Meli---------
#MAX y min filas
max_radar <- data.frame(max(Jugadores_bonus[,1]),max(Jugadores_bonus[,2]),max(Jugadores_bonus[,3]),max(Jugadores_bonus[,4]),max(Jugadores_bonus[,5]),
max(Jugadores_bonus[,6]),max(Jugadores_bonus[,7]),max(Jugadores_bonus[,8]),max(Jugadores_bonus[,9]),max(Jugadores_bonus[,10]),
max(Jugadores_bonus[,11]),max(Jugadores_bonus[,12]),max(Jugadores_bonus[,13]),max(Jugadores_bonus[,14]))
colnames(max_radar) <- colnames(Jugadores_bonus[,1:14])
Meli=rbind(max_radar, rep(0,14) , Jugadores_bonus[1,1:14])
# Custom the radarChart !
melichart <- radarchart( Meli , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[1]
)
-----#Gonzalez--------
Gonzalez=rbind(max_radar, rep(0,14) , Jugadores_bonus[2,1:14])
# Custom the radarChart !
Gonzalez_chart <- radarchart( Gonzalez , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[2]
)
-----#Videla--------
Videla=rbind(max_radar, rep(0,14) , Jugadores_bonus[3,1:14])
# Custom the radarChart !
Videla_chart <- radarchart( Videla , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[3]
)
-----#Cerro--------
Cerro=rbind(max_radar, rep(0,14) , Jugadores_bonus[4,1:14])
# Custom the radarChart !
Cerro_chart <- radarchart( Cerro , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[4]
)
-----#Aued--------
Aued=rbind(max_radar, rep(0,14) , Jugadores_bonus[5,1:14])
# Custom the radarChart !
Aued_chart <- radarchart( Aued , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[5]
)
-----#Acuña--------
Acuña=rbind(max_radar, rep(0,14) , Jugadores_bonus[6,1:14])
# Custom the radarChart !
Acuna_chart <- radarchart( Acuña , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[6]
)
-----#Diaz--------
Diaz=rbind(max_radar, rep(0,14) , Jugadores_bonus[7,1:14])
# Custom the radarChart !
Diaz_chart <- radarchart( Diaz , axistype=1 ,
#custom polygon
pcol=rgb(0.2,0.5,0.5,0.9) , pfcol=rgb(0.2,0.5,0.5,0.5) , plwd=4 ,
#custom the grid
cglcol="grey", cglty=1, axislabcol="grey", caxislabels=seq(0,20,5), cglwd=0.8,
#custom labels
vlcex=0.8, title=Jugadores_bonus$jugador[7]
)
-----#todos los graficos juntos----
par(mfrow=c(4,2))
par(mfrow=c(1,1))
---#chernoff jugadores----
faces(Jugadores_bonus[,c(1:14)],face.type=1,labels=Jugadores_bonus$jugador)