News

Learning the language of R

Ahead of a training course early next year on the data environment known as R, we look at some of the wide-ranging ways in which data can be modelled and manipulated within the R system.
Published: 14 December 2015

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​R is a programming language, meaning users have to write a series of commands or 'code' to produce output. It was initially developed as a specific tool for statistical analysis. Advancements within R have, however, resulted in it becoming the lingua franca for data science in general. Within this single environment it is now possible to handle most if not all data analysis as well as tabular and graphical visualization of the results. It has therefore become the go-to tool for a range of fisheries and marine science applications.​

Versatility in data

ICES scientists use R to perform numerous specific tasks, including traditional stock assessment and simulating models of fisheries and ecological systems. The user often solves these tasks by using available R packages such as FLR, DATRAS, MSY, SURBAR, and VMStools. Scientists can also write their own R script to create new applications which can then be transferred and picked up readily by other users. In this way, R is flexible and free-form, enabling a user to shape the analysis according to their needs.

R can also turn raw data into tables, graphs, and maps. One example is with the case of the DATRAS trawl survey database, one of the backbones of ICES work and workshops. Via the ICES webservice users can fetch the data from the database they require – such as information on trawl stations – directly from within R. The data can then be manipulated and presented in the desired way. Similarly different input formats such as spreadsheets and text files containing multiple data fields can be presented visually using a sequence of R language commands. These can then be scripted for later application, rather than having to be done manually with a mouse.  ​

Learning the lingo

Taking place 29 February – 4 March 2016 at ICES Secretariat, the training course on the R environment will reflect the importance and widespread use of R in the ICES community and fisheries science.

"Our emphasis on the course will be on covering the fundamentals of the grammar of data and graphics. For this we will mostly rely on packages that fall under the umbrella of "Hadleyverse" (for example dplyr and ggplot2) that were designed to make coding of data analysis and graphical visualization as natural as possible. In addition we will cover the fundamentals of functions and creation of packages," explained Einar Hjörleifsson​​​, co-instructor of the course along with Bjarki Þór Elvarsson​.

"Through the use of the RStudio IDE​, we will at the same time teach the principles of reproducible document writing, where the R-code used to generate the results is seamlessly woven with the actual report text (html, pdf, or Word) or presentation."

"The course is targeted at marine scientists who already have some basic experience in R but are yet not proficient enough to write fluently code for data manipulation, exploration, and writing their own functions. We believe that some part of the course would also be beneficial to those that are currently productively using R in fisheries science but may along the way have skipped the basics or are unaware of recent advancements in the R environment."

Print this pagePrint it Request newsletterSend to Post to Facebook Post to Twitter Post to LinkedIn Share it
c FollowFollow Focus on ContentFocus on Content
HelpGive Feedback
SharePoint

Learning the language of R

International Council for the Exploration of the Sea (ICES) · Conseil International pour l'Exploration de la Mer (CIEM)
ICES Secretariat · H. C. Andersens Boulevard 44-46, DK 1553 Copenhagen V, Denmark · Tel: +45 3338 6700 · Fax: +45 3393 4215 · info@ices.dk
Disclaimer Privacy policy · © ICES - All Rights Reserved
top