Posts by Bruno • 248 points
4 posts
-
2
votes2
answers462
viewsA: How to sort data on Y-axis using ggplot2 in R
The fct_inorder function of the forcats of the tidyverse can help you library(forcats) library(ggplot2) dados <- structure(list(DNAsat = structure(c(9L, 4L, 10L, 5L, 11L, 12L, 13L, 14L, 15L, 6L,…
-
2
votes3
answers291
viewsA: In R, what is a Tibble?
In a more extensive way Tibbles within Tibbles Automatic coverage to support tidyverse groupings Pretty Print Multi-dispatch Data.frame functions work on Tibble library(tidyverse) # Tibbles inside…
-
4
votes2
answers124
viewsA: LANGUAGE R: Error "Error in course[[1:98]] : recursive indexing failed at level 2" when trying to search the items in a list, how do I resolve?
You can use the tidyverse map function in some ways library(tidyverse) teste <- list( a1 = list("a", "b"), a2 = list("a", "c"), a3 = list("a", "d"), a4 = list("a", "e") ) teste %>% map(~…
-
2
votes1
answer49
viewsA: Performance of conditionals in R: how to accelerate this process?
I’ll propose two alternatives being the fastest case_when, plus I’ll show you another way to write the code in tidyverse and fix a bug in your code library(microbenchmark) library(dplyr) #> #>…