I am new in R. My dataset consist categorical variable as "importance" having three categories as "High","Medium","Low" and total observations are 1000 and out this 150 are 'NA'. Now, I want to label encoding of above mentioned variable as "High"=0, "Medium"=1, "Low"=2 and also want to encode 'NA'=3. What I've done so far as:-
Data$importance=as.numeric(Data$importance)
but this is failed to encode "NA". In python we have library as labelEncoder. So is there any package available in R like this? If not then what is the most specific way to do this for multi categorical variables?