CHAPTER 14Machine Learning with R

When you're in a room of data scientists, statisticians, and math types, you'll hear one letter crop up again and again: the letter R. R is a programming language, and it's basically command-line driven. In addition to being used in the command-line shell, R can be written in code form and run.

Why am I telling you all this? Well, on top of the programming skills that get mentioned, you might also be asked, “Do you do R?” After this chapter, you'll hopefully have a starting point to reply, “Yes!”

Installing R

The R language comes ready to use for a number of operating systems. The download page at http://www.r-project.org has a number of mirror sites, so pick a mirror that's closest to you. From the mirror, choose the download for your operating system.

macOS

The current version of R (3.6 at time of writing) will run on the 64-bit Intel-based Macs. Download the file and open it to install it. It installs the R binaries into the /Applications folder.

Windows

The .exe download for Windows provides binaries for running on 32- or 64-bit machines. The base package download will provide you with everything you need to get started.

Linux

Binary downloads are available for Debian, Ubuntu, Red Hat, and SUSE Linux distributions. If you want to save some time (and effort) and you're running Debian or Ubuntu, then you can use apt-get to install the r-base and r-base-dev packages. Ensure that the repository package base is up-to-date first. ...

Get Machine Learning, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.