Question: ( 2 0 points ) Write an R script for parts ( a ) , ( b ) and ( c ) . ( see

(20 points) Write an R script for parts (a),(b) and (c).(see next page)
Run the script and hand in your R execution results.
Include the R commands in your HW1R script file submitted in canvas.
Page
Homework: Module 1
(a) Create a matrix A with 25 rows, 2 columns, and all entries equal 1.
(b) Reassign the first column of A so that the entry in the k th row and first column is: 2k. That is, the (row k, column 1)-entry of A is reassigned to 2k for k=1,2,3,cdots,25.
(c) Using a for () loop, reassign the entries of the second column of A as follows:
For odd k, reassign row k, column 2 of A as: k2.
For even k, reassign row k, column 2 of A as: eklogtdt.
This is the log with base e=exp(1). You may want to use $value at the end of the line.
 (20 points) Write an R script for parts (a),(b) and (c).(see

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!