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

Code description

Here are some more details on what the code has accomplished:

  • Line 1 of the code contains the function require, which is just a way of saying that R needs a specific package to run. In this case require(graphics) specifies that the graphics package is needed for the analysis, and it will load it into memory. If it is not available, you will get an error message. However, graphics is a base package and should be available.
  • Line 2 of the code loads the Women data object into memory using the data(women) function.
  • Lines 3-5 of the code display the raw data in three different ways:
    • View(women): This will visually display the DataFrame. Although this is part of the actual R script, viewing a DataFrame is a very common task, ...

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