Skip to content
  • YouTube
  • FaceBook
  • Twitter
  • Instagram

Data Analytics Ireland

Data Analytics and Video Tutorials

  • Home
  • Contact
  • About Us
    • Latest
    • Write for us
    • Learn more information about our website
  • Useful Links
  • Glossary
  • All Categories
  • Faq
  • Livestream
  • Toggle search form
  • how to select columns with SQL SQL
  • How to Pass Python Variables to Javascript Javascript
  • how to select all records with SQL SQL
  • What does a data analyst do? Livestream
  • how to create and drop a table in SQL SQL
  • What is GITHUB, and should I use it? github
  • Recursion Definition
  • How To Create An Empty Dictionary In Python python dictionaries

R tutorial – How to sort lists using rstudio

Posted on May 24, 2020December 29, 2020 By admin No Comments on R tutorial – How to sort lists using rstudio

You are kidding me; we can sort lists!
Yes, we have managed to bring you the groundbreaking video that will help transform your project! This video is just an introductory view of how to complete a sort on a list, but all is not what it seems.

Couple of things to note:

  • Creating a list in Rstudio means its a list that is it.
  • You need to create a vector so that that a sort of the data can give you the desired outcome you need.

So using :

#create the list
print("Example 1")
list1 <- list(5,4,3,2,1,"a","b")
print(list1)#defaults to list order
print(typeof(list1))

will get you started, but there is more to this, read on.

How we got this sorted

As you will see in the below video, we have taken an initial list and converted it to a vector using the c() function in rstudio.

Some of the functions used to sort are as follows:

  • sort
  • sort.int

The video explains the ways to use these, and some of the caveats you should watch out for as well.

 

 

Leaving you with this final thought

This video has a python equivalent, so if you want to see how we completed it there, see this blog posting How to sort Python lists

Data analytics Ireland

R Programming Tags:Data, Data Analysis, Data Analytics, Data Science, R programming language, rstudio, Sort lists

Post navigation

Previous Post: R – How to check a file exists and is not empty
Next Post: R Tutorial: How to pass data between functions

Related Posts

  • how to remove unwanted characters from your data R Programming
  • R – How to check a file exists and is not empty R Programming
  • What is the r programming language R Programming
  • R – How to open a file R Programming
  • R Tutorial: How to pass data between functions R Programming

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Select your language!

  • हिंदी
  • Español
  • Português
  • Français
  • Italiano
  • How To Check For Unwanted Characters Using Loops With Python Python Data Cleansing
  • How to Automate Testing With Python | unittest automation
  • Regular expressions python Python
  • Python Overview Interview Questions automation
  • What is a Primary Key and Foreign Key SQL
  • What are measures in Tableau? data visualisation
  • How to Compare Column Headers in CSV to a List in Python CSV
  • How To Add Values to a Python Dictionary Python

Copyright © 2023 Data Analytics Ireland.

Powered by PressBook Premium theme

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT