12.07.2015 Views

R dummies

R dummies

R dummies

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

With this file, R will start up with a different prompt (R: instead of >) and setthe server from the UK as the default server from which to install packages. Youalso define the go.home() function, which you can use at any point to set yourworking directory back to your home directory (D:/MyWorkspace, in this example.Installing and Configuring RStudioRStudio is a relatively new and shiny editor for R. It’s our first choice for thisbook because it’s easy to use, it has a decent Help page, it has very good support,and it incorporates R in a practical way. Of course, you’re free to work with any texteditor you like; in Chapter 2, we discuss some alternatives.Installing RStudioInstalling RStudio is easy. Just follow these steps:1. Go to www.rstudio.org/download.2. Click the Download RStudio Desktop button.3. Select the installation file for your system.4. Run the installation file.RStudio will be installed on your system. It normally detects your latestinstalled R version automatically. If you didn’t do anything funky, you should beable to use R from within RStudio without extra configuration.Configuring RStudioYou may want to use a different R version from the one RStudio detected. Forexample, you may want to use R in a 64-bit context. Or RStudio may not haverecognized your installation of R. In that case, you can set which R version to useby choosing Tools⇒Options to open the Options pane (see Figure A-1).To change the R version, click the Change button. Then you can switchbetween the default 32-bit R installation or the 64-bit R installation (if installed), oryou can choose a specific version of R. (RStudio lists all the versions it can find.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!