missing char values

Capture
I want to replace null values in the given column ,,,please suggest how to do

What would you like to replace them with? tidyr::replace_na might be useful here if you either want to replace them with one specific value or tidyr::fill if you want to copy from above or below.

I had used this command (given below) to replace Null values with mean but how can I replace null values of char datatype in R studio?
dataset$Item_Weight=
ifelse(is.na(dataset$Item_Weight),
ave(dataset$Item_Weight,FUN=function(x)
mean(x,na.rm = TRUE)),dataset$Item_Weight)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.