Despite all the memes around Microsoft Excel, Excel is still a powerful tool for quick and fast data transformation, data preprocessing (forget about the date thing 😉 ). This post is my attempt to tell an Excel person how they can replicate some of their most frequently used operation like VLOOKUP (Fuzzy) using R. We perform VLOOKUP’s approximate match first on Excel and replicate the same task on RStudio using stringdist_left_join() Fuzzy left join from the R package {fuzzyjoin}

How to do Excel VLOOKUP in R (using left_join, merge)

This tutorial helps you code Excel’s VLOOKUP (Exact Match) functionality in R using dplyr’s left_join() and Base-R’s merge(). Please let me know your feedback if this can help Excel users try out R and get confident about doing Data Analytics in R Youtube - https://www.youtube.com/watch?v=GsxlOwa4dSg Video Tutorial Code # library tidyverse for data manipulation and plot library(tidyverse) # reading input dataset co2 <- read_csv("C:/users/abdrs/Downloads/food_consumption.csv") countries <- read_csv("C:/users/abdrs/Downloads/Countries-Continents.

How to reshape a dataframe from wide to long or long to wide format

Reshaping a dataframe / table from long to wide format or wide to long format is one of the daily tasks a Data Analyst / Data Scientist would be doing. The long format is similar to the tidy format that the tidyverse advocates. Even while, it’s been a very common task - the tidyr package’s solution of using spread() and gather() almost never was intuitive enough to be used in the code without SOing or Referring the documentation.

How to embed Excel-like Spreadsheet Table in RMarkdown

If there’s a component that’s least interactive in an RMarkdown rendered document or a Shiny app - that’d be the Table that’s displayed. Yes, datatable does a good job of improving the Table Apperance and custom formatting like Conditional Formatting, it doesn’t give a Google Spreadsheet or Microsoft Excel flavor. This post is to let you know how you can embed that excel-like spreadsheet Table in your Rmarkdown.