A little announcement. A lot to explore.

Happy learning!

Explore lessons, including SAS & R programs and practice data.

Search lessons

Type at least 3 characters to see matching lessons.

Open SAS ↗Open R ↗
← SASnRInstall an R package

Introduction

  • Base R refers to the core functions and features that come pre-installed with R
  • While powerful and self-sufficient, Base R can be extended with packages to improve efficiency and readability
  • An R package is an extension of Base R that provides additional functions to enhance R's capabilities
  • Think of it as an add-on that simplifies or extends what R can do
    • Functions: Predefined blocks of code that perform specific tasks
      e.g., filter() in dplyr, ggplot() in ggplot2
    • Datasets: Built-in datasets that can be used for learning or testing
      e.g., iris, mtcars
    • Documentation: Help files and snippets to explain how to use the functions and datasets
    • DESCRIPTION file: Metadata about the package — title, version, dependencies, author, etc.
  • Below is the line of code that helps installing packages into our R environment