please can anyone help me the dataset given is not having a single missing value
@pankajchauhan.687 - You can use an inbuilt data set of R like iris data set and mtcars dataset .
If there is some missing value in the data set there is always an option of replacing or removing the missing value.
Some of the techniques are
- replace with the mode of the variable if the variable is categorical .
- replace with the median of the variable if the variable is numerical .
3)last option is to delete the row which contains the missing value.
Hope this helps!
that’s the problem it doesn’t have any missing value
What is the problem that you are facing? Did any function call fail
It is possible that you have
- You have empty values
- You have incorrect data types
I think, R by default doesnt consider blanks as missing values or NA.
so you’d need to explicitly convert blanks to NA. you may use the following.
train[train==’’] <- NA
Let me know if you see the difference.
Thanks for your reply lalit I wil try this…
Do you know a way to replace missing value of a categorical variable with two values
ie. combination of two in 2:1 ratio…?
I forgot say Hi btw…