Top "Dplyr" questions

Use this tag for questions relating to functions from the dplyr package, such as group_by, summarize, filter, and select.

Remove duplicated rows using dplyr

I have a data.frame like this - set.seed(123) df = data.frame(x=sample(0:1,10,replace=T),y=sample(0:1,10,replace=…

r dplyr
Summarizing count and conditional aggregate functions on the same factor

Quick and short of it is I'm having problems summarizing count and aggregate functions with conditions on the same factor. …

r dplyr
Select unique values with 'select' function in 'dplyr' library

Is it possible to select all unique values from a column of a data.frame using select function in dplyr …

r select unique dplyr
dplyr change many data types

I have a data.frame: dat <- data.frame(fac1 = c(1, 2), fac2 = c(4, 5), fac3 = c(7, 8), dbl1 = c('1', …

r dataframe dplyr
Select first and last row from grouped data

Question Using dplyr, how do I select the top and bottom observations/rows of grouped data in one statement? Data &…

r dplyr
Changing factor levels with dplyr mutate

This is probably simple and I feel stupid for asking. I want to change the levels of a factor in …

r dplyr
Select columns based on string match - dplyr::select

I have a data frame ("data") with lots and lots of columns. Some of the columns contain a certain string ("…

r regex dplyr
Gather multiple sets of columns

I have data from an online survey where respondents go through a loop of questions 1-3 times. The survey software (…

r reshape dplyr qualtrics tidyr
Group by multiple columns in dplyr, using string vector input

I'm trying to transfer my understanding of plyr into dplyr, but I can't figure out how to group by multiple …

r dplyr r-faq
Display / print all rows of a tibble (tbl_df)

tibble (previously tbl_df) is a version of a data frame created by the dplyr data frame manipulation package in …

r dplyr options display