Question: Question 6 : Integer and Logical Vector Subsetting The following code creates a numeric vector named vec which has length 1 0 0 . Create

Question 6: Integer and Logical Vector Subsetting
The following code creates a numeric vector named vec which has length 100.
Create four new vectors:
positive: A numeric vector that contains the elements of vec at indexes 3,12, and 32.
negative: A numeric vector that contains all of the elements of vec, except for those at indexes 9,17, and 32.
even: A numeric vector that contains the elements of vec at even indexes.
large: A numeric vector that contains all of the elements of vec that are greater than 66

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 Programming Questions!