Basic Vectors (Vectors)
Cut and paste the following vector into your assignment and then use code to print the requested values related to the vector.
numbers <- c(5, 2, 26, 8, 16)
- The number of items in the
numbersvector (using thelengthfunction) - The third item in the
numbersvector (using[]) - The smallest number in the
numbersvector (using theminfunction) - The largest number in the
numbersvector (using themaxfunction) - The average of the numbers in the
numbersvector (using themeanfunction) - The first, second and third numbers in the
numbersvector (using[]) - The sum of the values in the
numbersvector (using thesumfunction)