Question: Exercises Write R code to create three vectors (v1, v2, and v3), and initialize them with the following integers. v1: 1, 3, 5 v2: 7,

Exercises

  1. Write R code to create three vectors (v1, v2, and v3), and initialize them with the following integers.
    1. v1: 1, 3, 5
    2. v2: 7, 9, 11
    3. v3: 13, 15, 17
    4. Create a matrix using these three vectors where each column represents one of these vectors.
    5. Create a matrix using these three vectors where each row represents one of these vectors.
  2. Write R code to create a data frame that contains details of at least seven students and display them as shown below with the same columns of information.

Exercises Write R code to create three vectors (v1, v2, and v3),

Names Gender student_ID Program Num_Courses 1 Alice Y F F 111111 CET 5 2 Bob z M 222222 CP 4 3 Charlie x M 333333 CST 4 Dian s M 444444 CET 5 ESOS Q F 555555 CP 6 Francois D M 666666 CST NA 7 Garrett E M M 777777 CP 3

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!