Question: For this exercise you will first need to open the file: SampleMatrix. then highlight and run the code below: #create matA and print it mata

 For this exercise you will first need to open the file:

For this exercise you will first need to open the file: SampleMatrix. then highlight and run the code below: #create matA and print it mata = matrix c(5. 2. 1,4,7,6), # the data elements nrow=2, # number of rows ncol=3, # number of columns byrow = TRUE) # fill matrix by rows mata # print the matrix 2.2MChallenge 1. Create a new Rscript file. 2. Write a script to create a matrix just like the one you just ran, except this time by columns, rather than rows. (Hint: One change in boolean value might help!). 3. Save it as (exactly) Challenge 22M.R 4. Submit the Rscript 5. Rinse and repeat if necessary

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!