• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

Order number largest to smallest R

Hi,
I've imported a text file to R studio. The file contains numbers. how can I order my file by largest to smallest? And then select and display the top 10 biggest numbers?

The numbers are stored in a variable called V1.
0
jay_eire
Asked:
jay_eire
  • 2
1 Solution
 
TommySzalapskiCommented:
You want to sort in "descending" order
http://stat.ethz.ch/R-manual/R-devel/library/base/html/sort.html

Then use the "head" function to grab the top 10
http://rfunction.com/archives/699
0
 
jay_eireAuthor Commented:
Thanks for the reply. Is there an R dedicated section  on here? I could not find one.
0
 
TommySzalapskiCommented:
No there is not. The Miscellaneous Programming and Math & Science topic areas are where I would recommend posting R questions. I lot of the experts that I know who use R monitor those topics.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now