Posts by Vinícius Félix • 139 points
3 posts
-
1
votes2
answers76
viewsA: Detect outliers in grouped data
I took your example, first created a data frame., transforming variables into numerical. library(tidyverse) df <- data.frame( id_group = c("1","1","2","1","3","2","2","3"), Case =…
ranswered Vinícius Félix 139 -
2
votes3
answers53
viewsA: maximum values
A solution using dplyr and maintaining the data frame.. library(dplyr) dados %>% # Ordenando os valores arrange(-km) %>% # Selecionando os 5 maiores slice(1:5)…
ranswered Vinícius Félix 139 -
0
votes1
answer43
viewsA: Continuous time data in R
An alternative is to add the variable year as Facet on the chart: ggplot(dados_mensais, aes(x=mes, y=total_obitos)) + geom_line(lwd=1.1, col='red')+ scale_y_continuous(labels = number_format(scale =…