Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For R language (1)(a) Create a vector that contains the following: * The integer sequence 1 to 5, inclusive, * The square root of 2,

For R language

(1)(a) Create a vector that contains the following: * The integer sequence 1 to 5, inclusive, * The square root of 2, * The product of 17 and 14, and * Three (3) repetitions of the vector c(2.5, 5, 7.5).

Assign the vector to the name q1_vector and output. You will use q1_vector for the following four (4) questions.

```{r test1a}

```

(1)(b) Remove all elements of q1_vector greater than 7. Assign this new vector, with only values equal to or less than 7, to the name q1_vector_7. What is the length of q1_vector_7?

```{r test1b}

```

(1)(c) Sort q1_vector in ascending order and assign the sorted vector to the name q1_vector_sorted. What is the sum of the 5th through 10th elements of q1_vector_sorted, inclusive?

```{r test1c}

```

(1)(d) Square each element of q1_vector and assign the new, squared value vector to the name q1_vector_sqrd. How many elements of q1_vector_sqrd are greater than 25?

```{r test1d}

```

(1)(e) Remove the first and last elements of q1_vector. Assign the two (2) removed elements to the name q1_vector_short. What is the product of the elements of q1_vector_short?

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

Performance Analysis And Synthesis For Discrete-Time Stochastic Systems With Network-Enhanced Complexities

Authors: Derui Ding, Zidong Wang, Guoliang Wei

1st Edition

0429880022, 9780429880025

More Books

Students also viewed these Mathematics questions