DataEditR: The GUI for Interactive Dataframe Editing in R
Written by Matt Dancho on May 18, 2021
This article is part of R-Tips Weekly, a weekly video tutorial that shows you step-by-step how to do common R coding tasks.
Here are the links to get set up. 👇
DataEditR Video Tutorial
For those that prefer Full YouTube Video Tutorials.
Learn how to use
DataEditR in our free YouTube video.
GUI for Editing Dataframes in R
Edit dataframes as if they were Excel tables.
DataEditR is a great addition to the R package ecosystem. I see it being immediately useful for beginners coming from Excel where they are used to being able to edit data interactively in an Excel Worksheet.
Find out how easy it is to edit data with the DataEditR GUI (Graphical User Interface).
I have an extra
ggplot2 code showing boxplots of the Fuel Economy at the end of the tutorial (a vision of where you can go once you learn R beyond the GUI).
Beginners Struggle with R
Simple tools like DataEditR can make your transition much easier.
One of my biggest challenges when I moved from
R was the transition from an interactive worksheet where I could edit data using point-click-edit to a data frame that requires code to edit. This was a serious hurdle. I wish I had a tool like
DataEditR when I was first starting out.
Fast-forward to 2021, and here we are:
DataEditR, the GUI I never had. Today, you’ll learn how to use this Excel-style dataframe editing tool.
Before we get started, get the R Cheat Sheet
DataEditR is great for making simple edits. But, you’ll still need to learn how to wrangle data with
dplyr and visualize data with
ggplot2. For those topics, I’ll use the Ultimate R Cheat Sheet to refer to
ggplot2 code in my workflow.
Download the Ultimate R Cheat Sheet Then Click the “CS” next to “ggplot2” opens the Data Visualization with GGplot2 Cheat Sheet.
Now you’re ready to quickly reference
Onto the tutorial.
How DataEditR works
It’s super-simple. Just run this code to:
- Load Libraries: Load
- Import Data: We’re using the
mpgdataset that comes with
- Start Data Editing: Use the
This launches the Data Editor.
The Data Editor
Try Editing Cells
Click on a cell and make any edits.
Try Selecting Columns
Click the target icon. Then select columns you are interested in.
When you’re done, save a CSV
After you’ve made your edits, you can optionally save a CSV File. Alternatively, you can return a data frame in your active R Session.
Save as CSV File
DataEditR is great for making simple edits. But, eventually you’re going to need to go further by using code to wrangle data and prepare visualizations. For this, I’ll circle back to
ggplot2, and my Ultimate R Cheat Sheet.
Fuel Economy by Vehicle Model
Say that you wanted to make a visualization that shows the differences in vehicle models and their fuel economy measured as miles per gallon (MPG). We can do this with
Visualization and Insights
The code makes a stunning
ggplot2 visualization that highlights the differences in fuel economy by vehicle model and class. We can see:
- SUV’s clearly have the lowest fuel economy although the Subaru Forester AWD seems to be an outlier.
- Toyota Corolla is leading the pack with Highway MPG in the mid-30s.
You’ve seen how
DataEditR can be used for making simple edits inside of R. You’ve also seen that learning
ggplot2 can generate insights through visualizations.
What if you want to go further? Read on.
My Struggles with Learning Data Science
At the beginning of the article, I talked briefly about my struggles learning R. It took me a long time. And I made a lot of mistakes as I fumbled through learning R. I specifically had a tough time navigating the ever increasing landscape of tools and packages, trying to pick between R and Python, and getting lost along the way.
If you feel like this, you’re not alone.
In fact, that’s the driving reason that I created Business Science and Business Science University (You can read about my personal journey here).
What I found out is that:
Data Science does not have to be difficult, it just has to be taught smartly
Anyone can learn data science fast provided they are motivated.
How I can help
If you are interested in learning R and the ecosystem of tools at a deeper level, then I have a streamlined program that will get you past your struggles and improve your career in the process.
It’s called the 5-Course R-Track System. It’s an integrated system containing 5 courses that work together on a learning path. Through 5+ projects, you learn everything you need to help your organization: from data science foundations, to advanced machine learning, to web applications and deployment.
The result is that you break through previous struggles, learning from my experience & our community of 2000+ data scientists that are ready to help you succeed.
Ready to take the next step? Then let’s get started.
👇 Top R-Tips Tutorials you might like:
- mmtable2: ggplot2 for tables
- ggside: Plot linear regression with marginal distributions
- DataEditR: Interactive Data Editing in R
- openxlsx: How to Automate Excel in R
- officer: How to Automate PowerPoint in R
- DataExplorer: Fast EDA in R
- esquisse: Interactive ggplot2 builder
- gghalves: Half-plots with ggplot2
- rmarkdown: How to Automate PDF Reporting
- patchwork: How to combine multiple ggplots
Want these tips every week? Join R-Tips Weekly.