If you want to train a random forest with data having missing values, then maybe you have some misconceptions about training a model.
Training a machine learning model means, we are giving input data to model so that a specific algorithm can draw a pattern from that pattern. If you train any machine learning model with missing data, then maybe you are doing it wrong.
You should pre-process your dataset if you’re having missing value. You can use an imputer to fill missing values.
If you are having a really small data set (that’s not useful for machine learning), then you can set this parameter like this:
na.action = na.omit
Hope this answer helps you a bit.