Question: In R: Using vec1 and vec2 below, write and execute code that works elementwise and multiplies the two values together if they are not equal

In R: Using vec1 and vec2 below, write and execute code that works elementwise and multiplies the two values together if they are not equal to one anther and takes 10*vec1+vec2 if they are equal. Store the result in vec3.

vec1=c(2,2,4,5,6,7,9,3) vec2=c(1,2,3,5,5,7,8,2)

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!