This repository contains data sets and R code for our Exploring Data Using R book.
~ Kamarul Imran Musa & Wan Nor Arifin ~
The object names (X, Y, Z) are capitalized. These should be x, y, and z instead.
Operators for the expressions are missing. These should be:
- Equal ==
- More than or equal >=
- Less than or equal <=
- More than >
- Less than <
- Not equal !=
The text:
What is meant by
breaks = c(-Inf, 40, 50, Inf)
here is "from minus infinity to below 40, between 40 to 50, from above 50 to infinity".
Should be read:
What is meant by
breaks = c(-Inf, 40, 50, Inf)
here is "from minus infinity to 40, from above 40 to 50, from above 50 to infinity".
The labels should be:
labels = c("<= 40", "> 40-50", "> 50")
instead oflabels = c("< 40", "40-50", "> 50")
The following can be added to exclude the upper limit:
cut(..., right = FALSE)
Then the label will be:
labels = c("< 40", "=> 40 to < 50", "=> 50")
We apologize for the errors.