In machine learning, statistics, and information theory, reducing the number of random variables is a process of dimensionality reduction which is considered by a set of principal variables For training, the model which are having lots of features is not preferred, since it reduces the accuracy and also costly.
The first step is to pre-process the dataset which involves removing missing values.
To remove the missing values, the code is as follows:
data[data==" ?"] <- NA
data= na.omit(data)
As you have mentioned you are new to Data Science then learn Data Science with R which will help you to solve your problem.
Refer the link below to learn Data Science with R course