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]
2 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]2 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
Solve the following system of linear equations. 3x + 2y = 10 2x + 3y = 15/2 No solution y = (-3/2)x + 5 x = 3, y = -1/2 x = 3, y
frutty [35]
3x + 2y = 10 .....multiply by -2
2x + 3y = 15/2...multiply by 3
------------------
-6x - 4y = -20 (result of multiplying by -2)
6x + 9y = 22.5 (result of multiplying by 3)
-----------------add
5y = 2.5
y = 2.5/5
y = 1/2

3x + 2y = 10
3x + 2(1/2) = 10
3x + 1 = 10
3x = 10 - 1
3x = 9
x = 9/3
x = 3

solution is (3,-1/2)
5 0
3 years ago
Please help me find the which function was graphed I’m struggling a lot with functions
Advocard [28]

Answer:

answer is B

Step-by-step explanation:

............

3 0
3 years ago
Read 2 more answers
How do you do this problem?
faust18 [17]

The volume of the original cylinder is

... V = π·r²·h

For r=1 and h=1, this is

... V = π·1²·1 = π

For the new cylinder, the volume is 1.089 times that amount.

... V = 1.089π = π·1.1²·(1-k)

... 1.089/1.21 = 1-k

... k = 1 - 1.089/1.21 = 1 - 0.9 = 0.1 = 10%

The appropriate choice is (B) 10.

7 0
3 years ago
Read 2 more answers
0.75 is the square root of what value?
lina2011 [118]
0.75^2 = 0.5625.....sq rt 0.5625 = 0.75
4 0
3 years ago
Read 2 more answers
How much change will you get back if you bought three 0.78 chocolate bars and paid with a $5 bill?
Hitman42 [59]
2 dollars and 66 cents
4 0
3 years ago
Read 2 more answers
Other questions:
  • Paul’s dog weighs 12 pounds more that Issac’s dog. Together they weigh 50 pounds. How much does Issac dog weigh ???
    13·1 answer
  • F(x)=x2+5x-1 is shifted 3 units left the result is g(x) what is g(x)?
    8·1 answer
  • . A mason has 7,758 bricks that he needs to share equally among 9 different building sites. How many
    12·2 answers
  • 8 boxes if each box contains 1.8 ounces of raisins
    10·2 answers
  • Three lines intersect to form the triangle shown below. What is the value of x in degrees?
    6·1 answer
  • What is the measurement of SV
    5·1 answer
  • Use distributive property to rewrite each algebraic expression: 8(s + 5)
    10·2 answers
  • Three bags of chips and sodas cost $12.50. Four bags of chips and two sodas cost $10.00. What is the cost of each item? ASAP pls
    5·1 answer
  • Does 2x+18=25 equal X=3.5
    7·2 answers
  • Can someone help me pls ASAP
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!