Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Algebra And Number Theory An Integrated Approach

Authors: Martyn R Dixon, Leonid A Kurdachenko, Igor Ya Subbotin

1st Edition

0470640537, 9780470640531

More Books

Students also viewed these Mathematics questions

Question

Behaviour: What am I doing?

Answered: 1 week ago