Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can anyone write the code for these (2-20)? it is for R studio 7. Print directly to the console the result of multiplying (5) by
can anyone write the code for these (2-20)?
it is for R studio
7. Print directly to the console the result of multiplying (5) by (6) Vectors 8. Create an object called myVec and store a sequence of values from 6 to -12 that progress in steps of 0.2 9. Overwrite the object myVec using the same sequence in the reverse order. 10. Write one line of R code to determine how many elements are in my vec 11. Write one line of R code that will extract the first and last elements in myVec. Assume that you do not know how many elements are in my Vec 12. Create an object called myVec2 and write one line of R code that will store the following a sequence of length 5 from 6 to 9 a twofold repetition of the vector (4, 3.1456, -67) the value +2 13. Create a seperate object called x and store the values returned by omitting the first and last values of myvec2 Matrices 14. Create an object called myMat and store a 4 x 2 matrix that's filled row-wise with the values 5.3, 3.7, 8.4, 8.2, 3.2, 0.9, 1.6, and 6.5, in that order 15. Write a single line of R code that will display the dimensions of myMat if you remove row 2 16. Write a single line of R code that will display the data structure if you delete the fourth row and the first column from myMat 17. Write a single line of R code that will display the data structure and suppress the behavior seen in problem 16. 18. Create an object called myMat2 and store the bottom four elements of myMat 19. Write a single line of R code that will overwrite the object myMat2 with the original values of myMat2 plus append a new row with the values 2.7 and 8.8 20. Write a single line of R code that will display the dimensions of myMat2 X Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started