1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
HACTEHA [7]
3 years ago
15

Consider the vector x: x <- c(2, 43, 27, 96, 18) Match the following outputs to the function which produces that output. Opti

ons include sort(x), order(x), rank(x) and none of these
Mathematics
1 answer:
Nookie1986 [14]3 years ago
7 0

<u>Completed Question</u>

Outputs to be matched to the functions are:

  • 1,2,3,4,5
  • 1,5,3,2,4
  • 1, 4, 3, 5, 2
  • 2, 18, 27, 43, 96

Answer:

  • sort(x): 2, 18, 27, 43, 96
  • order(x): 1, 5, 3, 2, 4
  • rank(x) : 1, 4, 3, 5, 2
  • none of these :  1, 2, 3, 4, 5

Step-by-step explanation:

Given the vector x: x <- c(2, 43, 27, 96, 18)

<u>Sort</u>

In R, the sort(x)  function is used to arrange the entries in ascending or descending order. By default, R will sort the vector in ascending order.

Therefore, the output that matches the sort function is:

sort(x): 2, 18, 27, 43, 96

<u>Rank</u>

The rank function returns a vector with the "rank" of each value.

x <- c(2, 43, 27, 96, 18)

  • 2 has a rank of 1
  • 43 has a rank of 4
  • 27 has a rank of 3
  • 96 has a rank of 5
  • 18 has a rank of 2

Therefore, the output of rank(x)  is: 1, 4, 3, 5, 2

<u>Order</u>

When the function is sorted, the order function gives the previous location of each of the element of the vector.

Using the sort(x) function, we obtain: 2, 18, 27, 43, 96

In the vector: x <- c(2, 43, 27, 96, 18)

  • 2 was in the 1st position
  • 18 was in the 5th position
  • 27 was in the 3rd position
  • 43 was in the 2nd position
  • 96 was in the 4th position

Therefore, the output of order(x) is: 1, 5, 3, 2, 4

You might be interested in
AGHI ~ AYZX. What is m H<br> N<br> 500<br> 1<br> 350<br> 950<br> Х<br> 950<br> G<br> Y<br> mZI =<br> Submit
kvv77 [185]

Answer:

is this even a problome becuse i never seen such a question

Step-by-step explanation:

5 0
3 years ago
I really need help please
Arturiano [62]
This is true. you don't need to provide a counterexample
6 0
3 years ago
What’s the relationship between these two angles?
Dovator [93]

Answer:

Co- interior angles

Step-by-step explanation:

Together they add up to 180°

So angle 5x= 115°

5 0
2 years ago
The remainder after diving x^4+3x^3-8x^2+5x-9 by x+5 is ____.
raketka [301]

Use the polynomial remainder theorem. It says that a polynomial f(x) has remainder f(c) upon division by x-c.

Here we have

f(x)=x^4+3x^3-8x^2+5x-9

and c=-5, so the remainder is

f(-5)=(-5)^4+3(-5)^3-8(-5)^2+5(-5)-9=\boxed{16}

6 0
3 years ago
Lol help now files just type it
insens350 [35]

Answer:

2 = 4/2

Step-by-step explanation:

Well the one for the 2 wholes, Since 2 wholes equal 4/2

because 4/2 simplified is 2 whole it I believe would be 4/2

6 0
3 years ago
Read 2 more answers
Other questions:
  • Please answer this I really need help
    12·1 answer
  • The total weight of 30 bags of flour and 4 bags of sugar is 42.6 kg. if each bag of sugar weighs 0.75 kg, what is the weight of
    12·2 answers
  • Plsssssssssssssssssssssssssssssss help
    10·1 answer
  • There was no more rainfall for the rest of the day. Click on the graph until the graph that best represents the given statement
    15·2 answers
  • - 4(5a - 3b) simplified is?
    12·2 answers
  • Tell whether -3 is a solution of the inequality <br>3-4r &gt;_ 15<br>​
    9·1 answer
  • FAST ANSWER PLEEEAAAAASE Verify that (sinx-cosx)^1=1-2sinxcosx is an identity.
    8·2 answers
  • What two number multiple to get -72 and add up to -6
    13·1 answer
  • Rita is adding 3 + (negative 8) + 1. She rewrites the expression as 3 + (negative 1) + 8.
    8·1 answer
  • Convert y = -x + 50 to<br> standard form
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!