I’m trying to calculate “mean” value of a column in R. This column has Null values in some places. I get the answer as NA if I try the following command.

> mean(myDataset$imdb)
[1] NA

Therefore, I tried the following command in order to remove the Null values from calculation. However, I still get the following error. Can someone help me to spot the issue.

> mean(myDataset$imdb, na.rm=TRUE)

Warning message:
In mean.default(myDataset$imdb, na.rm = TRUE) :
  argument is not numeric or logical: returning NA

enter image description here