Posts by Woldinei Meier • 51 points
2 posts
-
1
votes2
answers175
viewsA: Apply function in data groups
With the help of @Pierre Lafortune, follows the answer: library(dplyr) dados %>% group_by(tipo, data, bairro) %>% arrange(pvalor) %>% mutate(sobra = round(((lead(pvalor) / pvalor)*100)-100,…
-
4
votes2
answers175
viewsQ: Apply function in data groups
I need to separate the data into groups and perform the calculations in two or three groups/dimensions. I found the tapply function, it solves the problem. With it I get what I need by using the…