Question: Create a vector ' y ' containing ' ( 2 , 2 , 2 , 2 , 4 , 4 , 4 , 4 ,

Create a vector 'y' containing '(2,2,2,2,4,4,4,4,8,8,8,8)' using the ' rep()' function. You might need to check the help file for ' rep()'' by typing '? rep' in the console to see all of the options that ' rep()' will accept. In particular, look at the optional argument 'each='.
58
a. Find the mean of vector 'y' using the function 'mean()'.
b. Use google search to find the function in 'R' that computes the variance of a vector and find the variance of 'y'.
60
 Create a vector 'y' containing '(2,2,2,2,4,4,4,4,8,8,8,8)' using the ' rep()' function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!