September 2018
Beginner
206 pages
4h 27m
English
Use the following code to load the datasets library:
library(datasets)
Use the following code to load the diamonds dataset:
data("diamonds")
The function str() can be used to examine the diamonds dataset as follows:
str(diamonds)
We understand that there are three factors of ordered type as we examine the diamonds dataset. To identify the class of those factors, we can use the function class() as follows:
class(diamonds$cut)class(diamonds$color)class(diamonds$clarity)
The following code can be used to load the midwest dataset:
data("midwest")
The str() function can be used to examine the midwest dataset as follows:
str(midwest)
The following code can be used to convert the character variables ...
Read now
Unlock full access