Question: Given a vector of numeric values, write a single R expression without any explicit loop that returns TRUE if all the elements in the vector


Given a vector of numeric values, write a single R expression without any explicit loop that returns TRUE if all the elements in the vector are odd values between 20 and 65, othenNise your expression returns FALSE. You can assume that the given vector is assigned to a variable named x. Assign the variable x to the following data and test your expression on both. TRUE scenario: c(23, 25, 27,47, 51, 53, 63) FALSE scenario: c(25, 43, 45, 59, 61, 71, 83, 93)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
