R Packages Essentials
2025-11-28
Tip

Packages like dplyr simplify tasks by providing clean, concise code for data manipulation.
1. Create a new column: total, which is the sum of two existing columns (var1 and var2).


2. Filtering: get values of var1 greater than 2.

3. Select specific variables: get var1 and var3.

Scenario: You have a data frame with a column study and a column data, where data contains nested data frames for each study.
We want to fit a linear model to each nested data frame (predicting y by x) and store the models in a new column called model.

The primary repository for R packages, stability and rigor.
Pros ๐
Cons โ ๏ธ
There are currently +23,000 of packages (on CRAN only).


It compiles R packages useful for agricultural research and data analysis.

A platform that allows developers to share packages with fewer restrictions, encouraging innovation and collaboration.
Pros ๐
Cons โ ๏ธ
A platform designed for bioinformatics and computational biology, providing tools for genomic and biomedical data.
Pros ๐
acorrend@uoguelph.ca Adrian A. Correndo
Assistant Professor
Sustainable Cropping Systems
Department of Plant Agriculture
University of Guelph
Rm 226, Crop Science Bldg | Department of Plant Agriculture Ontario Agricultural College | University of Guelph | 50 Stone Rd E, Guelph, ON-N1G 2W1, Canada.
![]() |
||
![]() |
![]() |