# NOT RUN {
#Procedimiento autom<U+00C3><U+00A1>tico
s<-IN_LAGO_MONTERO(2019,"04","F:/",n_escanos = 350)
if(!(is.null(s) || is.na(s))){
print(s$V_indice)
print(s$Porcentaje_votos)
print(s$Porcentaje_escanos)
}
#Procedimiento manual
da1 <- data.frame( # Contains the votes
Reg=c("Alava","Albacete","Madrid","Barcelona","Valladolid"),
PSOE=c(400,300,0,50,25),
PP=c(300,200,10,150,2),
Cs=c(400,0,3,300,45),
Uno=c(465,23,341,263,0))
da2 <- data.frame( # Contains the total seats of each province
Reg=c("Alava","Albacete","Madrid","Barcelona","Valladolid"),
escanos=c(2,3,6,5,4))
s2<-IN_LAGO_MONTERO(Auto = FALSE,d_votos = da1,d_escanos = da2)
# }
Run the code above in your browser using DataLab