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
Which property is demonstrated in the equation 6×(8×1)=(6×8)×16×(8×1)=(6×8)×1 ?
maksim [4K]
Associativ property a(bc)=(ab)c ability to move parenthaseese around
5 0
3 years ago
Read 2 more answers
Kayla is pricing whole wheat flour.
lianna [129]
A 2 pound pag at food saver sells flour for the lowest because if you buy the same amount of flour for each one easiest way would be 70 pounds and if you compare all four you will notice a 2 pound bag is the lowest unit price
5-90.3
2-87.5
7-94.5
10-90.23
5 0
3 years ago
Can someone pls help me find this is important
Olenka [21]

Answer:

x=90° and y=35°

Step-by-step explanation:

to get x and y first you must find the middle angles based on the information you have so:

35+90+n=180° solve for n to get what the middle angles are (since they are vertical angles they are equal) so the middle angles are both 55 degrees

and then 180-x=that angle that is also on the line with x so we'll call it k

so k+55+y=180°

we can see that y equals 35* because I noticed that those are parallel lines on the outside of the triangle so 35* and y angles are congruent and y =35°

now 35+55+k=180°

solve for the angle next to x which we called k and it is 90°

so x=90° and y=35°

after all this math I realized that if they are parallel lines then we can just use that to figure it out so use the properties to find out that x=90° and y=35°

7 0
3 years ago
Read 2 more answers
PLEASE HELP ME!
marshall27 [118]
Answer is (4x³ - 6)(16x² + 36 + 24x³)
8 0
3 years ago
A concession stand sells 50 drinks, of which 17 are orange juice. What is the probability that the next drink sold will be orang
ra1l [238]
34% because...
17/50 times 2= .34= 34%
7 0
3 years ago
Other questions:
  • The length of a rectangle is 25
    12·1 answer
  • Write the following equation in slope-intercept form.<br> 1/2-y+6=0
    13·1 answer
  • Question 3 Unsaved The formula for calculating simple interest relates the amount of interest, I, to the principal, p, the inter
    13·1 answer
  • What’s 127.2 divided by 14
    6·1 answer
  • William works at a nearby electronics store. He makes a commission of %6, percent on everything he sells. If he sells a computer
    6·2 answers
  • Help please and explain it<br><br>i posted this one before but it got deleted somehow
    7·1 answer
  • A baby weighs 8 pounds 10 ounces. If her weight doubles in 6 months, how much will she weigh in 6 months?
    14·2 answers
  • I need help with number 2 80% is x of 40
    8·1 answer
  • Find the surface area of the following figure below. Use 3.14 for pi
    7·1 answer
  • 23. A triangular earring has side lengths of 1.5 centimeters, 2 centimeters, and 3
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!