Rstats 101
  • Home
  • LLM
  • dplyr
  • tidyr
  • ggplot2
  • Statistics
  • How-To
  • Base R

dplyr Tutorials

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

3 ways to rank numbers with tidyverse

Learn 3 ways to rank numbers with tidyverse in R. Practical tutorial with examples.

Compute rowwise mean and standard deviation

Learn compute rowwise mean and standard deviation with this comprehensive R tutorial. Includes practical examples and code snippets.

How to Change Column Name with a variable name

Learn how to change column name with a variable name with this comprehensive R tutorial. Includes practical examples and code snippets.

How to Randomly Replace Values of Numerical Columns in a dataframe to NAs

Learn how to randomly replace values of numerical columns in a dataframe to nas with this comprehensive R tutorial. Includes practical examples and…

How to Select Rows of a dataframe by position

In this post, we will see how to subset a dataframe or select rows based on their position. We will first use dplyr’s slice() function to slice a…

How to Split a Dataframe into a list of Dataframes by groups in R

Learn how to perform split a dataframe into a list of dataframes by groups in R. Step-by-step statistical tutorial with examples.

How to add Prefix/Suffix to Column Names of a dataframe in R

Learn how to perform add prefix/suffix to column names of a dataframe in R. Step-by-step statistical tutorial with examples.

How to add row number within each group in dplyr

Learn how to add row number within each group in dplyr with this comprehensive R tutorial. Includes practical examples and code snippets.

How to apply a function on multiple columns using across()

Learn how to apply a function on multiple columns using across() with this comprehensive R tutorial. Includes practical examples and code snippets.

How to collapse multiple rows based on a column

Learn how to collapse multiple rows based on a column with this comprehensive R tutorial. Includes practical examples and code snippets.

How to convert a list to a dataframe

Learn how to convert a list to a dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to count number of missing values per row in a dataframe

Learn how to count number of missing values per row in a dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to count unique values with n_distinct() in R

Learn count unique values with n_distinct() in r with clear examples and explanations.

How to do inner join with dplyr in R

Learn how to perform do inner join with dplyr in R. Step-by-step statistical tutorial with examples.

How to extract a column of a dataframe as a vector in R

Learn how to perform extract a column of a dataframe as a vector in R. Step-by-step statistical tutorial with examples.

How to filter rows in a dataframe: dplyr’s filter()

Learn how to filter rows in a dataframe: dplyr’s filter() with this comprehensive R tutorial. Includes practical examples and code snippets.

How to get the first row of each group in R

Learn get the first row of each group in r with clear examples and explanations.

How to get the last row of each group in R

Learn get the last row of each group in r with clear examples and explanations.

How to get top and bottom rows of each group in R

Learn get top and bottom rows of each group in r with clear examples and explanations.

How to number rows within a group in dataframe

Learn how to number rows within a group in dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to randomly select rows from a dataframe in R

Learn how to perform randomly select rows from a dataframe in R. Step-by-step statistical tutorial with examples.

How to remove columns with all NAs

Learn how to remove columns with all nas with this comprehensive R tutorial. Includes practical examples and code snippets.

How to remove rows with all NAs

Learn how to remove rows with all nas with this comprehensive R tutorial. Includes practical examples and code snippets.

How to rename one or more columns of a dataframe

Learn how to rename one or more columns of a dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to replace NA in a column with specific value

Learn how to replace na in a column with specific value with this comprehensive R tutorial. Includes practical examples and code snippets.

How to select columns that starts with a prefix/string in R

Learn how to perform select columns that starts with a prefix/string in R. Step-by-step statistical tutorial with examples.

How to select one or more columns from a dataframe

Learn how to select one or more columns from a dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to select only numeric columns in a dataframe

Learn how to select only numeric columns in a dataframe with this comprehensive R tutorial. Includes practical examples and code snippets.

How to select top and bottom rows by a column simultaneously

Learn how to select top and bottom rows by a column simultaneously with this comprehensive R tutorial. Includes practical examples and code snippets.

How to sum a column by group in R

Learn how to perform sum a column by group in R. Step-by-step statistical tutorial with examples.

How to update rows in a dataframe with rows_update() in R

Learn update rows in a dataframe with rows_update() in r with clear examples and explanations.

How to use across() in R

Learn how to use across() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use anti_join() to find non-matching rows in R

Learn use anti_join() to find non-matching rows in r with clear examples and explanations.

How to use arrange() in R

Learn how to use arrange() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use distinct() in R

Learn how to use distinct() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use everything() in R

Learn how to use everything() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use filter() in R

Learn how to use filter() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use group_by() in R

Learn how to use group_by() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use mutate() in R

Learn how to use mutate() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use pick() to select columns dynamically in R

Learn use pick() to select columns dynamically in r with clear examples and explanations.

How to use pull() in R

The dplyr::pull() function extracts a single column from a data frame as a vector. Unlike bracket notation or the $ operator, pull() integrates…

How to use relocate() in R

The relocate() function from the dplyr package is designed to change the position of columns in a data frame without altering the data itself. This…

How to use rename_with() in R

Learn how to use rename_with() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use select() in R

Learn how to use select() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use starts_with() in R

Learn how to use starts_with() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use summarise() in R

Learn how to use summarise() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use summarize() in R

Learn how to use summarize() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

How to use where() in R

Learn how to use where() in R with practical examples. Step-by-step guide with code you can copy and run immediately.

Join dataframes by different column names with dplyr

Learn join dataframes by different column names with dplyr in R. Practical tutorial with examples.

dplyr across(): Compute column-wise mean

Master dplyr across() to compute column-wise mean. Complete R tutorial with examples using real datasets.

dplyr arrange: Sort rows by one or more variables

Learn dplyr arrange to sort rows by one or more variables. Practical R tutorial with clear examples.

dplyr between(): find if numerical values are within a range.

Master dplyr between() to find if numerical values are within a range.. Complete R tutorial with examples using real datasets.

dplyr case_when() to create new variable using multiple conditions

Learn dplyr case_when() to create new variable using multiple conditions with this comprehensive R tutorial. Includes practical examples and code…

dplyr contains(): select columns that contains a string

Master dplyr contains() to select columns that contains a string. Complete R tutorial with examples using real datasets.

dplyr count(): count unique values of a variable

Master dplyr count() to count unique values of a variable. Complete R tutorial with examples using real datasets.

dplyr ends_with(): select columns that end with a suffix

Master dplyr ends_with() to select columns that end with a suffix. Complete R tutorial with examples using real datasets.

dplyr filter(): How to select rows with partially matching string

Master dplyr filter() to how to select rows with partially matching string. Complete R tutorial with examples using real datasets.

dplyr n_distinct(): count unique elements or rows

Master dplyr n_distinct() to count unique elements or rows. Complete R tutorial with examples using real datasets.

dplyr near(): compare if numbers and vectors are nearly the same

In this tutorial, we will learn near() function part of R package dplyr to check the equality of two numbers or vectors. Often we would like to…

dplyr row_number(): Add unique row number to a dataframe

Master dplyr row_number() to add unique row number to a dataframe. Complete R tutorial with examples using real datasets.

dplyr rows_update(): Modify existing rows

Master dplyr rows_update() to modify existing rows. Complete R tutorial with examples using real datasets.

dplyr transmute(): add new columns and delete existing columns

Master dplyr transmute() to add new columns and delete existing columns. Complete R tutorial with examples using real datasets.

dplyr’s anti_join() to find rows based on presence or absence in a dataframe

Complete guide to dplyr anti_join() in R. Learn with practical examples and step-by-step explanations.

dplyr’s mutate(): How to create new columns

Complete guide to dplyr mutate() in R. Learn with practical examples and step-by-step explanations.

slice_max: get rows with highest values of a column

Learn slice_max: get rows with highest values of a column with this comprehensive R tutorial. Includes practical examples and code snippets.

slice_min: Get Rows with minimum values of a column

Learn slice_min: get rows with minimum values of a column with this comprehensive R tutorial. Includes practical examples and code snippets.

No matching items

    Featured Tutorial

    Introduction to Mixed Effects Models

    Learn when and why to use mixed models for longitudinal data with lme4

    Browse by Topic

    dplyr

    59 tutorials

    Data manipulation with filter, select, mutate, joins & more

    tidyr

    22 tutorials

    Reshape data with pivot_wider, pivot_longer, separate & unite

    ggplot2

    22 tutorials

    Create beautiful visualizations with the grammar of graphics

    Statistics

    31 tutorials

    T-tests, ANOVA, regression, correlation & more

    How-To

    53 tutorials

    Practical guides for common R tasks

    Base R

    21 tutorials

    Core R programming fundamentals

    Copyright 2025 Rstats101. All rights reserved.

     
    • About

    • Privacy Policy