Question: Question 4 : Loops and vectorization in R Need R code and explanation. Using a for loop, create a new variable in the Orange data
Question : Loops and vectorization in
Need R code and explanation. Using a for loop, create a new variable in the Orange data called oldandlarge that takes the value TRUE
of age and circumference and FALSE otherwise. Do the same thing in vectorized form no
for loop Hint: use the ifelse function.
dataOrange
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
