Nulls in Vectors (Vectors)
Cut and paste the following vector into your assignment.
Then use code to print the requested values related to the vector.
You’ll need to use na.rm = TRUE
to ignore the null values.
numbers <- c(7, 6, 22, 5, NA, 42)
- The smallest number in the
numbers
vector - The largest number in the
numbers
vector - The average of the numbers in the
numbers
- The sum of the values in the
numbers
vector