Question

solve in R

Which of the following command correctly sorts the data frame by School in descending order and Expression in ascending order

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We can directly use negative sign in front of the column we want to order decreasing by. Please note both the columns to order by should be inside the order function.

The code for this problem will be -

painterABC[order(-painterABC$School, painterABC$Expression) , ]

This will select all the rows and the resulting data frame will be sorted by School in descending order followed by Expression in ascending order

Add a comment
Know the answer?
Add Answer to:
solve in R Which of the following command correctly sorts the data frame by School in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Develop a program that accepts integers from command line, sorts the integers into ascending order, computes...

    Develop a program that accepts integers from command line, sorts the integers into ascending order, computes the sum of the integers, and counts the number of even numbers and the number of odd numbers. Solve in C programing language?

  • Use MATLAB’s ode45 command to solve the following non linear 2nd order ODE: y'' = −y'...

    Use MATLAB’s ode45 command to solve the following non linear 2nd order ODE: y'' = −y' + sin(ty) where the derivatives are with respect to time. The initial conditions are y(0) = 1 and y ' (0) = 0. Include your MATLAB code and correctly labelled plot (for 0 ≤ t ≤ 30). Describe the behaviour of the solution. Under certain conditions the following system of ODEs models fluid turbulence over time: dx / dt = σ(y − x) dy...

  • Rank the following alkenes in order of decreasing stability. con cor do con Which option correctly...

    Rank the following alkenes in order of decreasing stability. con cor do con Which option correctly ranks the alkenes in order of decreasing stability, starting with the most stable on the left and least stable on the right? O C>A>B>D A>C>B>D o C>A>D>B O A>c>D>B D>B>A>C OOOO

  • 11.3 0(N log,N) Sorts 11. A merge sort is used to sort an array of 1,000...

    11.3 0(N log,N) Sorts 11. A merge sort is used to sort an array of 1,000 test scores in descending order Which one of the following statements is true? a. The sort is fastest if the original test scores are sorted from smallest to largect b. The sort is fastest if the original test scores are in completely random order. The sort is fastest if the original test scores are sorted from largest to smallest c. The sort is the...

  • Given this data: //Random Hex numbers (hint: note that form is 0x then 8 digits) (Corrected...

    Given this data: //Random Hex numbers (hint: note that form is 0x then 8 digits) (Corrected April 9, 2018) 0x6b8b45670x327b23c60x643c98690x663348730x74b0dc510x19495cff0x2ae8944a0x625558ec0x238e1f290x46e87ccd0x3d1b58ba0x507ed7ab0x2eb141f20x41b71efb0x79e2a9e30x7545e1460x515f007c0x5bd062c20x122008540x4db127f80x216231b90x1f16e9e80x1190cde70x66ef438d0x140e0f760x3352255a0x109cf92e0xded726390x7fdcc2330x1befd79f0x41a7c4c90x6b68079a0x4e6afb660x25e45d320x519b500d0x431bd7b70x3f2dba310x7c83e4580x257130a30x62bbd95a0x436c61250x628c895d0x333ab1050x721da3170x2443a8580x2d1d5ae90x6763845e0x75a2a8d40x8edbdab90x79838cb20x4353d0cd0xb03e0c690x189a769b0x54e49eb40x71f324540x2ca886110x836c40e90x2901d8290x3a95f8740x8138641n0x1e7ff5210x7c3dbd3d0x737b8ddc0x6ceaf0870x22221a700x4516dde90x3006c83e0x614fd4a10x419ac2410x5577f8e10x440badfc0x507236790x3804823e0x77465f010x7724c67e0x5c482a970x2463b9ea0x5e884adc0x51ead36b0x2d5177960x580bd78f0x153ea4380x3855585c0x70a64e2a0x6a2342ec0x2a487cb00x1d4ed43b0x725a06fb0x2cd89a320x57e4ccaf0x7a6d8d3c0x4b588f540x542289ec0x6de91b180x38437fdb0x7644a45c0x32fff9020x684a481a0x579478fe0x749abb43 Please write a code OR 3 separate codes in C-code (NOT C++) that can do the following: 1. Sort ascending 2. Sort descending 3. Frequency of occurrence The input is the the data listed above. Separate codes may be used if necessary. The letters t and n have no significance. When listing in ascending or descending order, it does not...

  • Which of the following is the main requirement for a binary search algorithm? a. The list...

    Which of the following is the main requirement for a binary search algorithm? a. The list must have an odd number of elements. b. The list must be sorted in ascending order. C. The list must be sorted in descending order. d. The list must have an even number of elements.

  • Saved Which of the following correctly identifies the expression for calculating the Inflation rate for period...

    Saved Which of the following correctly identifies the expression for calculating the Inflation rate for period t based on the CPI? Multiple Choice cn-cre 1 X 100 CPL-CPL CHE x 100 < Prev 7 of 14 III text > MacBook Air 23 4 SV $ # 3 * 2 % 5 & 7 - 6 8 9 W E R T Y U P un D G H K

  • used Linss file systems d FAT nd NTFS NTFS and est3 h ReiserFS and ext3 15....

    used Linss file systems d FAT nd NTFS NTFS and est3 h ReiserFS and ext3 15. A fie a hem ppicaly you might possibly sreae entries for all the ie than enongheir that file sy stemtains ore than enough 16. To create a syesbolic link, use the a. In command h In command with the -s optiorn d. symlink command You can learn numerous details about any file using the 17 s brip2 and buenion etitities in Linux? d. gzip...

  • 1.Which of the following Linux scripting commands would be used to access the single command-line parameter...

    1.Which of the following Linux scripting commands would be used to access the single command-line parameter that a user has typed on the command-line? Group of answer choices A) $0 B) $# C) $$ D) $* E) $1 2. If I type the command “update my local Internet settings” (without the quotes) at the Linux command-line, from within the running script which of the following variables would the word “Internet” be stored in, if the script gets run correctly? Group...

  • Write a R code for the following Using the SATGPA data set in Stat2Data package. Test...

    Write a R code for the following Using the SATGPA data set in Stat2Data package. Test by using α= .05. 1) Create the following three variables and then print out all the six variables. Create a new variable “SAT”, which is the sum of MathSAT and VerbalSAT. Create second new variable “SATLevel”, and assign the value of “SATLevel” as 1 when SAT<=1100, 2 when 11001300. Create third new variable “GPALevel” and assign the value of “GPALevel” as 1 when GPA<=2.8,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT