Solved

Order number largest to smallest R

Posted on 2013-12-16
3
1,075 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

627 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