Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

sort in descending order in r

#sort by mpg (ascending) and cyl (descending)
newdata <- mtcars[order(mpg, -cyl),]
Source by www.statmethods.net #
 
PREVIOUS NEXT
Tagged: #sort #descending #order
ADD COMMENT
Topic
Name
8+4 =