From the data analysis, we detect an empty cell at the third row and second column. It is necessary to eliminate this anomaly before you can analyze the data frame. To do this, we can enter a NA value in the empty cell.
To set all of the empty cells to a NA value we can act as follows:
SampleData[SampleData==""]<-NA
To confirm the operation, we'll see the summary using summary function again:
summary(SampleData)
The results are shown in the following figure:
Now, in the age column there is an NA value. The same result could be done when reading the dataset, when we use the read.csv function. Let's see how:
SampleData=read.csv ...