Question: Write a program to obtain the minimum between two corresponding elements of two vectors. As an example, for the two vectors A=(1,2,3,4) and B=(4,3,2,1), your

Write a program to obtain the minimum between two corresponding elements of two vectors. As an example, for the two vectors A=(1,2,3,4) and B=(4,3,2,1), your program should return the minimum as (1,2,2,1). Repeat the exercise to obtain the maximum. After you are done with your program, use the pmin and pmax functions available in R.

Step by Step Solution

3.36 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The minimum between two corresponding elements of two vectors the smal... View full answer

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 A Course In Statistics With R Questions!