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
this question is pretty easy i just dont understand, so if you could answer asap that would really help :)
alexdok [17]
The second choice should be correct

6 0
3 years ago
1. Create a scenario that leads to an inequality of the form ax + b &gt; c. You can use any of the inequality symbols (&gt;, ≥,
marshall27 [118]

the form ax + b > c

Step-by-step explanation:

7 0
3 years ago
Y = -6, W = 7, j = -2<br><br> - 2y +w-4j
Reika [66]

Answer:

answer is 27

Step-by-step explanation:

-2(-6) + 7 -4(-2)

12+7+8

19+8

27

Hope this helped

7 0
3 years ago
* Two cars started to move from C and from D, towards one another. The car that starts at point C moves twice as fast as the car
Crazy boy [7]

Answer:

The answer to the question is

If Boston is at D and C is 90 km away from Boston, then the two cars will meet at 30 km from Boston.

Step-by-step explanation:

Let the speed of the car that start from C = V₁

Let the speed of the car that start from D = V₂

Therefore where V₁ = 2·V₂

We have at time t when the cars meet the distance covered by the car that start from C will be V₁×t = 2·V₂×t, while the distance of the other car will be

V₂×t

Which means that the distance covered by the car that start from C is twice that of the car that start from D

Hence if Boston is located at D which is 90 km from C then both cars will meet at

90 km /3 = 30 km from Boston as the car originating from Boston would only have covered 30 km when the two cars meet.

3 0
3 years ago
Select the two expressions that are equivalent to each other.
bulgar [2K]
D and E are equivalent to eachother
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which expression is equivalent to 16c+24d​
    12·2 answers
  • What is h(x) =-3x2 - 6x + 5 written in vertex form?
    11·2 answers
  • Tori had $20 to buy a birthday present for her dad. She decided to buy a DVD for $18. The sales tax is 7%. Does she have enough
    7·1 answer
  • the newspaper reported that 134.8 million viewers watched the Super Bowl. Write the number of viewers in standard form
    9·1 answer
  • Which expression is equivalent to 4(6 + 8)? (1 point)
    10·1 answer
  • 3/11 ÷ 3/11<br>and <br>9/10 ÷ 3/5<br><br>PLZ HELP ME<br>​
    6·2 answers
  • TunsAXP what is the value of x when x = 13
    12·2 answers
  • Please help me with this question
    13·1 answer
  • Abdul has an original recipe for a drink with apple, orange and pineaplle juice.He makes new fruit drinks by making different qu
    12·1 answer
  • If a₁ = 4 and an = 5an-1 then find the value of a5.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!