Before doing any transformations in the dataset, we will analyze the properties of the data, such as its dimensions, its variables, and its summary:
- Let's start by loading the iris dataset from the datasets library:
data <- datasets::iris
Now, we can view the dimensions of the data:
dim(data)
Here, we can see that there are 150 rows and 5 columns in the data:
Let's display the first five records of the data:
head(data)
Let's have a glance at the data:
Now, let's have a look at the datatypes of the variables in the dataset: ...