I'm using a data set where the 11th column on a csv file has numeric data. It contains some NA values too. Here is the str of the object:
str(dataheart)
num [1:4706] 14.3 18.5 18.1 NA NA NA 17.7 18 15.9 NA ...
So, as a new student of R, I had expected the result of range(dataheart)
to be the min and max values.From looking at the CSV file with data, I know that the min and max are 10.1 and 21.9.
But the above returns a vector
[1] NA NA
Is my understanding of this function incorrect?
You need
see
?range
For extra credit, here's a list of the functions in the
base
andstats
packages that usena.rm
:For further consideration of which functions in R deal with
NA
s and how, one could do an analogous search for functions with anna.action
argument (lm
and friends).