Tips for analyzing Excel data in R
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
If you're familiar with analyzing data in Excel and want to learn how to work with the same data in R, Alyssa Columbus has put together a very useful guide: How To Use R With Excel. In addition to providing you with a guide for installing and setting up R and the RStudio IDE, it provide a wealth of useful tips for working with Excel data in R, including:
- To import Excel data into R, use the readxl package
- To export Excel data from R, use the openxlsx package
- How to remove symbols like “$” and “%” from currency and percentage columns in Excel, and convert them to numeric variables suitable for analysis in R
- How to do computations on variables in R, and a list of common Excel functions (like RAND and VLOOKUP) with their R equivalents
- How to emulate common Excel chart types (like histograms and line plots) using R plotting functions
Conversely, you can also use R within Excel. The guide suggests BERT (Basic Excel R Toolkit), which allows you to apply R functions to Excel data via the Excel formula interface:
With BERT, you can also open an R console within Excel, and use R commands to manipulate data within the spreadsheet. BERT is open-source and available here, and you can see the detailed guide to using Excel data in R at the link below.
RPubs: How To Use R With Excel (via author Alyssa Columbus)
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.