Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In R script, This question uses the vectors xVec and yVec created in the previous question and the functions sort, order, mean, sqrt, sum and

In R script, This question uses the vectors xVec and yVec created in the previous question and the functions sort, order, mean, sqrt, sum and abs.

set.seed(50) xVec <- sample(0:999, 250, replace=T) yVec <- sample(0:999, 250, replace=T)

(a) Pick out the values in yVec which are > 600. (b) What are the index positions in yVec of the values which are > 600? (c) What are the values in xVec which correspond to the values in yVec which are > 600? (By correspond, we mean at the same index positions.)

(d) How many values in yVec are within 200 of the maximum value of the terms in yVec? (f) How many numbers in xVec are divisible by 2? (Note that the modulo operator is denoted %%.) (e) Sort the numbers in the vector xVec in the order of increasing values in yVec. (f) Pick out the elements in yVec at index positions 1, 4, 7, 10, 13, . . . .

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

Step: 3

blur-text-image

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

LO6 List the components of job descriptions.

Answered: 1 week ago

Question

LO3 Define job design and identify common approaches to job design.

Answered: 1 week ago