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
The midpoint of AB is M (-3,-3) if the coordinates of A are (-8,-2)what are the coordinates of B
bearhunter [10]

The coordinates of B would be (2, -4)

In order to find this, we need to know that the value of M's points will always be the average of A and B's points. This is because it is the midpoint. Therefore we can use the following formula.

Value of x

(A + B)/2 = M

(-8 + B)/2 = -3

-8 + B = -6

B = 2

Then we can do the same for the y values

Value of y

(A + B)/2 = M

(-2 + B)/2 = -3

-2 + B = -6

B = 4

7 0
3 years ago
Assume that x is a positive acute angle.<br> Given: sin x =28/53<br> Find: sin 2x
alexdok [17]

Answer:

its sophisticated but answer is 3

Step-by-step explanation:

you have to dive deep into it and research

4 0
3 years ago
the sum of three times a number and 2 less than 4 times the same number is 15. which of the following equations could be used to
Ulleksa [173]
To solve for a number x,

3x+4x-2=15
7x-2=15
7x=17
x=2 3/7
or x=~2.43

was one of your answer choices either of the first two equations?
4 0
3 years ago
Which set of ordered pairs could be generated by an exponential function?
Leya [2.2K]

Answer:

(3,1) +(1,6)

Step-by-step explanation:

first yiu

3 0
3 years ago
Read 2 more answers
Is -7,964,837 × -7 positive or negative?
Inessa05 [86]
When using both negative symbols, and then multiplying them, this would mean that the numbers would be going up. 

A negative (x's) a negative equals a positive.

Your answer: positive.
6 0
3 years ago
Read 2 more answers
Other questions:
  • The original temperature is 29.9 the temperature decreases by 8.7 and then again by 17.8 what is the final temperature?
    12·1 answer
  • If points R and S are contained in a plane, then RS is entirely contained in that plane.
    8·1 answer
  • Find the distance between the number 2.6 and 5.9 on the numberline
    6·2 answers
  • the ticket booth at a school play sells 140 adult tickets and 210 student tickets. find the ratio of adults to students write yo
    14·2 answers
  • Solve the inequality. 2y ≥ 4​
    14·2 answers
  • (-7) × (-5) = _____
    11·2 answers
  • Rewrite! Write an new and equivalent equation that is easier to solve
    11·1 answer
  • Mac records a measure in square yards. For which type of problem would this measure be appropriate?
    5·1 answer
  • Find the rate of change of the linear function shown in the graph. Then find the initial value.
    5·1 answer
  • Need help with this question. only need help with A.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!