Delete rows with null value in R

I have a dataset with null values in 3 columns. However, I wish to delete rows with null values in only one of the specific columns named ‘occupation’.

train <- na.omit(train, cols = 'occupation') 

I am using the function above where I’ve specified the occupation column, however, it is also removing rows which have null values in other 2 columns as well.

You would want to use following code:

train = train[ !is.na ( train$occupation), ]