Solved

Order number largest to smallest R

Posted on 2013-12-16
3
1,059 Views
Last Modified: 2013-12-16
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
Comment
Question by:jay_eire
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
TommySzalapski earned 500 total points
ID: 39721437
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
 
LVL 7

Author Comment

by:jay_eire
ID: 39721457
Thanks for the reply. Is there an R dedicated section  on here? I could not find one.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39721528
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hive vs Impla in Hadoop 1 152
Powershell GUI 11 95
Script to move computer from one domain to another 6 54
VB.Net Outlook.ReportItem Body Text convert to Readable Characters 5 38
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is about my first experience with programming Arduino.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question