Suppose I have the following database
>data
zona candidato votos
1 A 100
1 B 20
2 A 30
2 B 15
I want, using dplry, the following array
>nova
zona votos_zona votosA votosB
1 120 100 20
2 45 30 15
I tried something like this
nova <- data %>%
group_by(zona) %>%
summarise(votos_zona= sum(votos),
votosA = ,
votosB = )
But I can not complete the code