Question: How does R do basic mathematical operations on a vector ( or numeric data frame ) ? That is , if I have a numeric

How does R do basic mathematical operations on a vector (or numeric data frame)? That is, if I have a numeric vector called vec and run the code vec*10, how does R execute the multiplication?
Question 3 Select one:
a.
R doesnt allow these kinds of operations on vectors.
b.
R applies the operation element-wise.
c.
R applies the operation to only the first element of the vector.
d.
R does the arithmetic on the average of the vector and returns that single number.

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!