RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post
gravatar

sharanchekuri

Sharan Kumar

Recently Published

Code-Through Tutorial: Cleaning and Transforming Data with dplyr
This code-through tutorial demonstrates how to clean, transform, and summarize data in R using the dplyr package. The goal is to provide a clear, beginner-friendly walkthrough of the core functions used in data wrangling. Using the built-in mtcars dataset, we will walk through filtering rows, selecting variables, creating new columns, sorting data, computing grouped summaries, and visualizing the results. These steps represent a typical workflow that analysts follow when preparing datasets for deeper statistical analysis or modeling. By the end of the tutorial, a new R user should feel confident applying these techniques to their own data. Using the built-in mtcars dataset, this tutorial will show how to: Load data into R Filter and select variables Create new variables using mutate() Sort observations with arrange() Group data and compute summaries Produce a basic plot to visualize results These functions represent the core workflow for data wrangling in R. By the end, a new user should be able to understand how to apply these techniques to any dataset in their own projects.