dplyr Tutorials

Learn data manipulation with dplyr - the grammar of data manipulation. These tutorials cover filtering, selecting, mutating, summarizing, and joining data frames.

Tutorial
3 ways to rank numbers with tidyverse
Compute rowwise mean and standard deviation
How to Change Column Name with a variable name
How to Randomly Replace Values of Numerical Columns in a dataframe to NAs
How to Select Rows of a dataframe by position
How to Split a Dataframe into a list of Dataframes by groups in R
How to add Prefix/Suffix to Column Names of a dataframe in R
How to add row number within each group in dplyr
How to apply a function on multiple columns using across()
How to collapse multiple rows based on a column
How to convert a list to a dataframe
How to count number of missing values per row in a dataframe
How to do inner join with dplyr in R
How to extract a column of a dataframe as a vector in R
How to filter rows in a dataframe: dplyr’s filter()
How to number rows within a group in dataframe
How to randomly select rows from a dataframe in R
How to remove columns with all NAs
How to remove rows with all NAs
How to rename one or more columns of a dataframe
How to replace NA in a column with specific value
How to select columns that starts with a prefix/string in R
How to select one or more columns from a dataframe
How to select only numeric columns in a dataframe
How to select top and bottom rows by a column simultaneously
How to sum a column by group in R
How to use filter() in R
How to use group_by() in R
How to use select() in R
How to use summarise() in R
How to use summarize() in R
Join dataframes by different column names with dplyr
dplyr across(): Compute column-wise mean
dplyr arrange: Sort rows by one or more variables
dplyr between(): find if numerical values are within a range.
dplyr case_when() to create new variable using multiple conditions
dplyr contains(): select columns that contains a string
dplyr count(): count unique values of a variable
dplyr ends_with(): select columns that end with a suffix
dplyr filter(): How to select rows with partially matching string
dplyr n_distinct(): count unique elements or rows
dplyr near(): compare if numbers and vectors are nearly the same
dplyr row_number(): Add unique row number to a dataframe
dplyr rows_update(): Modify existing rows
dplyr transmute(): add new columns and delete existing columns
dplyr’s anti_join() to find rows based on presence or absence in a dataframe
dplyr’s mutate(): How to create new columns
slice_max: get rows with highest values of a column
slice_min: Get Rows with minimum values of a column
No matching items