O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Housekeeping and loading of necessary packages

First, clear out the workspace (after saving any R objects you will need later):

rm(list = ls())

Then, install the required packages:

install.packages("dplyr")install.packages("wakefield")install.packages("sqldf")install.packages("RSQLite")

The convention in this book will be to specify a simple install.packages("packagename") instruction to install the necessary packages, followed by a library("packagename") to load them into memory. Once the required packages are installed, you can either comment them out, or replace the line with conditional installation code:

try(require(dplyr) || install.packages("dplyr"))

But this syntax may not work on all R installations and GUIs, so we will keep ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required