Top "Tidyverse" questions

DO NOT USE if your question relates to one or two components of the tidyverse, such as dplyr or ggplot2.

Removing NA observations with dplyr::filter()

My data looks like this: library(tidyverse) df <- tribble( ~a, ~b, ~c, 1, 2, 3, 1, NA, 3, NA, 2, 3 ) I can remove all …

r dplyr tidyr tidyverse
ggplot 'non-finite values' error

I have an R dataframe (df) that looks like this: blogger; word; n; total joe; dorothy; 17; 718 paul; sheriff; 10; 354 joe; gray; 9; 718 …

r ggplot2 tidyverse tidytext
Convert all columns to characters in a data.frame

Consider a data.frame with a mix of data types. For a weird purpose, a user needs to convert all …

r dataframe tidyverse
How to transpose a dataframe in tidyverse?

Using basic R, I can transpose a dataframe, say mtcars, which has all columns of the same class: as.data.…

r dataframe transpose tidyr tidyverse
Setting row names on a tibble is deprecated. Error: invalid 'row.names' length

I am trying to make a heatmap of a sites vs. species abundances matrix. With thanks to Maurits Evers for …

r heatmap tidyverse tibble readr
Error in bind_rows_(x, .id) : Argument 1 must have names

Here is a code snippet: y <- purrr::map(1:2, ~ c(a=.x)) test1 <- dplyr::bind_rows(y) …

r dplyr tidyverse
How to reorder factor levels in a tidy way?

Hi I usually use some code like the following to reorder bars in ggplot or other types of plots. Normal …

r ggplot2 dplyr tidyverse
Remove rows where all variables are NA using dplyr

I'm having some issues with a seemingly simple task: to remove all rows where all variables are NA using dplyr. …

r dplyr tidyverse
How to convert list of list into a tibble (dataframe)

I have the following list of list. It contains two variables: pair and genes. The contain of pair is always …

r dplyr tidyverse
r:tidyverse: How to change column data type using pipes with least typing

Pipes and tidyverse are sometimes very convenient. The user wants to do convert one column from one type to another. …

r pipe tidyverse