Question: Using R Studio solve for the following. (1) (a) Create a vector that contains the following, in this order, and output the final, resulting vector.
Using R Studio solve for the following.


(1) (a) Create a vector that contains the following, in this order, and output the final, resulting vector. Do not round any values, unless requested. * A sequence of integers from 0 to 4, inclusive. * The number 13 * Three repetitions of the vector c(2, -5.1, -23). * The arithmetic sum of 7/42, 3 and 35/42 '{r testla} (1)(b) Sort the vector created in (1)(a) in ascending order. Output this result. Determine the length of the resulting vector and assign to "L". Output L. Generate a descending sequence starting with L and ending with 1. Add this descending sequence arithmetically the sorted vector. This is vector addition, not vector combination. Output the contents. Do not round any values. '{r testlb} (1)(c) Extract the first and last elements of the vector you have created in (1) (b) to form another vector of the extracted elements. Form a third vector from the elements not extracted. Output these vectors. '{r test1c} (1) (d) Use the vectors from (c) to reconstruct the vector in (b). Output this vector. Sum the elements. '{r testid} (1) (a) Create a vector that contains the following, in this order, and output the final, resulting vector. Do not round any values, unless requested. * A sequence of integers from 0 to 4, inclusive. * The number 13 * Three repetitions of the vector c(2, -5.1, -23). * The arithmetic sum of 7/42, 3 and 35/42 '{r testla} (1)(b) Sort the vector created in (1)(a) in ascending order. Output this result. Determine the length of the resulting vector and assign to "L". Output L. Generate a descending sequence starting with L and ending with 1. Add this descending sequence arithmetically the sorted vector. This is vector addition, not vector combination. Output the contents. Do not round any values. '{r testlb} (1)(c) Extract the first and last elements of the vector you have created in (1) (b) to form another vector of the extracted elements. Form a third vector from the elements not extracted. Output these vectors. '{r test1c} (1) (d) Use the vectors from (c) to reconstruct the vector in (b). Output this vector. Sum the elements. '{r testid}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
