Question: This problem will give you some practice with creating and manipulating vectors. a) Using `seq()`, create a vector consisting of an arithmetic sequence of integers

This problem will give you some practice with creating and manipulating vectors. a) Using `seq()`, create a vector consisting of an arithmetic sequence of integers from 0 to 12 with a common difference of 3 stored in a variable called mySeq. Report mySeq. b) Describe how the different arguments in each of the three following commands changes the output of `rep()`: `rep(mySeq,3)`, `rep(mySeq,each=3)`, and `rep(mySeq,mySeq)`. c) Concatenate the sequence 1:6 to the end of the vector described by `rep(mySeq,mySeq)` and store the resulting vector in the same mySeq variable. Report the length of mySeq. d) Create a square matrix populated row-wise from your mySeq vector and store it in a variable called sqMtrx. Report the element located in the 4th row and 3rd column of sqMtrx.

Thank you

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!