R: Some Useful Commands

R is primarily a stats language, used for various operations in Data Science. Here are some common uses and associated commands for you.

Gotchas

To start with, R is case sensitive, and typing "help" or "Help" will give different results. Depending on your background you may be used to this or not.

Other things that catch people out include variable assignment, dropped dimensions and lack of consistency across conventions namning.

Two articles explaining more can be found on R Gotchas and Sytax Quirks.

Getting Help

Finding out more in R is as easy as typing "help", "help.start()", help(target) or ?target.

A quick guide to more help can be found at statmethods.net.

Data Wrangling

R is used a lot in the cleaning, converting, mapping, sorting and organising of data, also known as data wrangling.

Some data scientists are said to spend 50%-80% of their time performing this important but often laborious task.

Useful commands and syntax involved in data wrangling can be found at this Codeasmanuscript cheatsheet.

Stats Commands

There are a whole raft of operations that can be used within R, moreso when 3rd party packages are brought into play.

There is a short list of useful R commands from the Personality Project, with sections on input and display, distributions, stats and graphics.

 

 

Author

Duncan Thomson

A Remote Software and Database Contractor specialised in Umbraco, Duncan works from wherever he finds himself. He is the co-organiser of the Python Exeter and Data Science Exeter meetup groups and speaks about Remote Working, Umbraco, Python and .NET Outside of work he is keen on travel, random generation, foreign languages and good food.

comments powered by Disqus