Question: Create a R script, give it a name that you choose and save it into a folder that you choose. The script needs to do
Create a R script, give it a name that you choose and save it into a folder that you choose.
The script needs to do the following things.
1, Remove all objects in the current working directory, which you can see in the environment pane. At the beginning, typically you have nothing in the "environment", but remove nevertheless.
2, Create a 4 by 5 matrix called data1 with all its elements are numbers 1 to 20 (by column).
3, Create a 5 by 4 matrix called data2 with all its elements being 0. Try and/or google if you are not sure how to create a matrix with identical elements.
4, Replace data2s second column by data1s first row.
5, Remove data1.
I can't do question 4, is it possible for you to type out the function for question 4 for me? thanks!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
