Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

Getting ready

The XDF file you have created in the previous recipe Creating an XDF file from CSV input in this chapter, contains the following nine variables:

  • YEAR
  • QUARTER
  • MONTH
  • DAY_OF_MONTH
  • DAY_OF_WEEK
  • ORIGIN
  • DEST
  • DEP_DELAY
  • ARR_DELAY

The objective of this recipe is to create a new binary variable binDelay, representing an indicator variable; if the departure delay is positive, then this new variable will get a value of 1, and 0 otherwise. Since you are going to use the XDF file for this operation, the task will be automatically split into chunks. You will need to load the RevoScaleR library for this operation.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content