October 2017
Beginner to intermediate
572 pages
26h 1m
English
In statistics, observations or data can be treated as nominal, ordinal, interval, and ratio variables or values. Label variables such as gender and name are known as nominal variables. Non-numeric concepts such as happiness, sadness, and so on qualify for ordinal variables. Interval variables show numeric scales, such as the wind in the previous example. Ratio variables shows the ratio of magnitude such as the height and weight dataset.
In this recipe, we first display the structure of the airquality data using the str function. From the structure of data, you can find the attribute month is a categorical type. As a result, we transform the data from an integer type to a factor type using the factor function.
Read now
Unlock full access