Suppose we are given the following data set
age = c(22, 17, 15, 19, 16, 15, 23, 76)
# When we run the print command, the outputs are as follows
print(age)
## [1] 22 17 15 19 16 15 23 76
#Now, do the following questions hereunder:
average age
median age
variance of the age
semi-interquartile range
mean absolute deviation
minimum age value
maximum age value
Given the following commands:
age2 = c(22, 25, 28, 31, 34, 37, 40, 43, 46, 49)
print(age2)
## [1] 22 25 28 31 34 37 40 43 46 49
-(a) Write R commands to generate age2.
-(b) Write a code to select only the first four numbers from age2.