Posts by abreums • 54 points
4 posts
-
2
votes2
answers98
viewsA: How to plot a graph of columns grouped with ggplot
... library(tidyverse) library(scales) dt <- read_csv2("ImportacaoR.txt") # é preciso "pivotar" / "rodar" os dados # para que haja uma coluna com os anos e outra com os efetivos dt <- dt…
-
-1
votes1
answer47
viewsA: ggplot: geom_area - error with aes(Fill)
You need the parameter group when using factors on the chart so that geom_area does not interpret each factor as a different group. The doc in this link has an example with geom_line. To get the…
-
0
votes1
answer129
viewsA: R - Accumulated inflation
I believe the function cumprod already makes the calculation of the accumulated rate you seek: taxas <- c(0.5, 0.6, 0.8) taxas # [1] 0.5 0.6 0.8 taxas_acumuladas <- cumprod((taxas/100) + 1) -…
-
2
votes4
answers285
viewsA: Separate data by values on the line?
I understand that the goal is to get the final sets already separated, and that the process can be the most automatic. If we had the lists with the values of the "buy" attribute of each subset, it…