Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following vector in the R console: x1 0, and y2[j] = 0, if x1[j] 0. (iii) Create a vector y4 whose i th

Consider the following vector in the R console: x1 <- c(1.1, -2.3, 2.5, 0.5, -3.2, -4, 5.2, -2.2, -2.2, 3) (i) Generate a new vector y1 whose entries are the entries of x1 with odd index; i.e., x[1], x[3], .... (ii) Form a vector y2 such that for each j, y2[j]=x1[j], if x1[j] > 0, and y2[j] = 0, if x1[j] 0. (iii) Create a vector y4 whose i th entry is 0 if x1[i]> 0 and 1 if x1[i] 0.

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago