HOW TO‎ > ‎

How to install R, Rexcel and using R through Excel

Installation of RExcel

Abstract

  • Excel is the most prevalent software used for data storage, analysis, and interpretation. Elementary and medium-quality mathematical and statistical functions are included with Excel. Good statistical analysis in Excel with more advanced methods than just frequency counts, however, requires an add-in package.
  • R is one of the best and most powerful statistics programs currently available.
  • RExcel integrates a menu system, based on the R Commander package, that puts complete access to the full power of R onto the Excel menu bar. Results from the analyses in R can be returned to the spreadsheet. Ordinary formulas in spreadsheet cells can use functions written in R.
Section 1: Basic Installation Procedures

The easiest way to install R, RExcel, and the additionally needed software modules and tools is to download the current version of RAndFriendsSetup from http://rcom.univie.ac.at. Running this program will install everything needed for a working configuration on your machine. 

If you already have a working version of R (version 2.8.1 or later) on your machine, you can simply install the R packages RExcelInstaller and RthroughExcel-WorkbooksInstaller (and the packages they require) from CRAN. Section 4 gives more details about this process.

Section 2: Supported Excel Versions

The RExcel add-in is supported for the following versions of MS Windows Excel:
  • Excel 2002 (=Excel XP)
  • Excel 2003
  • Excel 2007
  • Excel 2010
Section 3: Download and Installation of R and RExcel for MS Windows

The home website for RAndFriends is http://rcom.univie.ac.at/. Click on the Download tab on the website. You will find a download link to the latest version of the RAndFriends installer. RAndFriends includes the current release of R and the
  • rcom,
  • RExcelInstaller
  • HH,
  • RthroughExcelWorkbooksInstaller,
  • Rcmdr,
  • RcmdrPlugin.HH,
packages, and other packages. This is a large file (approximately 150MB), so this is best done with a fast internet connection.

Download the RAndFriendsSetup*.exe file to a temporary location.

Section 4: Download and Installation of R and RExcel for MS Windows

The installation requires Administrator access to your PC because the RExcel add-in uses the Windows Registry to configure communication between Excel and R.

If you have an ancient installation of RExcel, you will need to uninstall the Excel add-in and the (D)COM package before installing the newer version. Ancient means an RExcel version older than 3.0.0. 

Close Excel and any previous version of R.
Execute installer by double-click the downloaded file RAndFriendsSetup*.exe

The installer may take up to 15 minutes. It will install R with RExcel and R Commander and will give you the option to install
  • R through Excel’ demo files.
  • Rggobi. Rggobi is a very powerful 3D graphing program. Installing Rggobi also installs Glade and GTK+.
  • Notepad++ and NppToR. Notepad++ is a text editing program; NppToR enhances Notepad++ by adding an R mode.
The RAndFriendsSetup installer will install R and place an R icon on the desktop of the user performing the installation. RAndFriendsSetup will install the RExcel add-in to your installed version(s) of Excel if it finds Excel. It will pop up a message saying that RExcel is installed for Excel. 

After RExcel is installed, the RAndFriendsSetup installer will start additional installers for the checked items and it will need to download statconnDCOM from the internet.

Section 5: Verify the installation of the RthroughExcel worksheets.

Click the RExcel with RCommander icon. When it finishes loading, the cursor will be in Excel. In Excel 2007 or Excel 2010, click the Add-Ins tab to get the RExcel menu. In Excel 2003, the RExcel menu is on the main Excel menubar. Click the RExcel menu and verify that the RthroughExcel Worksheets item is there. This is the menu for the worksheets in the R through Excel book.

If the RthroughExcel Worksheets item is missing, then there is one more step. On the Windows taskbar, click the R Console item. Type the following two lines exactly into the R Console window. Punctuation and capitalization must be correct.

library(RthroughExcelWorkbooksInstaller) 
installRthroughExcel()

The installer needs a working internet connection. Then close R and Excel.

The installation is now complete. Congratulations! You now have a copy of one of the world’s best statistical software systems fully integrated into your MS Excel. The installer file RAndFriendsSetup*.exe is no longer needed.

Section 6: Starting Excel and RExcel

Start Excel and then start RExcel and Rcmdr after the Excel session is running. 

Starting RExcel and Rcmdr from Excel 2007 or Excel 2010:

Excel opens with the Home tab expanded into the Ribbon. Click the Add-Ins tab to get the RExcel menu, see below.


The Add-Ins Ribbon opens with the Menu Commands box listing the installed add-ins. If you have additional add-ins installed, you may have additional menu items above or below the RExcel item, see below.

Click R Start on the RExcel menu. 


There is no visible change after R has started. Click the RExcel item again, and then click the RCommander with Excel menus item as below.


The R Commander menu is now on the Excel Add-Ins Ribbon. The R Commander window has opened on the right as below.



Starting RExcel and Rcmdr from Excel 2003:

In Excel 2003, click RExcel RStart.


There is no visible change after R has started. Click RExcel RCommander with Excel menus. This opens the Rcmdr window and places the Rcmdr menu on the Excel toolbar.


Initial full-screen appearance of Excel 2003 with the Rcmdr window on the right. The RExcel menu item is on the main menu. The Rcmdr menu toolbar is on the main Excel toolbar as below.


ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:52
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 21:53
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
ą
Diep Ho,
28 Jun 2012, 20:13
Comments