1. Home
  2. Training Library
  3. 2. Introduction to Data

How to install a package in R

Developed with
QA

The course is part of this learning path

Fundamentals of R
course-steps 11 lab-steps 1 description 1
play-arrow
Start course
Overview
DifficultyBeginner
Duration11m
Students16
Ratings
5/5
star star star star star

Description

Course Description 

This module introduces you to some of the basics of how to interpret data with R.  

Learning Objectives 

The objectives of this module are to provide you with and understanding of 

  • How to use calculator operations in R  
  • How to store results with labels  
  • The difference between print and cat in R  
  • How libraries can be installed in R  

Intended Audience 

Aimed at all who wish to learn the R programming language. 

Pre-requisites 

No prior knowledge of R is assumed 

Delegates should already be familiar with basic programming concepts such as variables, scope and functions 

Experience of another scripting language such as Python or Perl would be an advantage 

Having an understanding of mathematical concepts will be beneficial 

Feedback 

We welcome all feedback and suggestions - please contact us at qa.elearningadmin@qa.com to let us know what you think. 

Transcript

- [Instructor] Before we understand how to install a package, let us start by defining what is a package. A package is a collection of functions. Possibly including data sets that might be useful That are developed by the R community. Let us remember that the philosophy of R is that it is open sourced and community driven. So where are the packages located? In repositories online. Usually CRAN. And how do we install packages? What's surprising or unusual is that we actually would install a package as part of the console. The main benefit is that we never really have to leave the programming language. We never have to leave the console. So for example, taking a random package and wanting to install it. I can install packages such as, viridisLite utilizing this aptly named install.packages function. I can install it and on the screen it will tell me that it's going to the internet, it's going to grab the package, we can have a look and see where this package lives and see that it is going to pick up the package that I would like to install from the CRAN repository. It's downloading that zip file and then successfully unpacking it and then installing it. And if I would like to load this package in, I'd have to run and utilize the library command. Lib, and I'd have to spell it correctly And then by pressing enter and clicking on the Packages tab I can search for this package viridisLite and I can see that it has been installed and it has been loaded.

About the Author

Students127
Labs1
Courses11
Learning paths1

Kunal has worked with data for most of his career, ranging from diffusion markov chain processes to migrating reporting platforms.  

Kunal has helped clients with early stage engagement and formed multi week training programme curriculum. 

Kunal has a passion for statistics and data; he has delivered training relating to Hypothesis Testing, Exploring Data, Machine Learning Algorithms, and the Theory of Visualisation. 

Data Scientist at a credit management company; applied statistical analysis to distressed portfolios. 

Business Data Analyst at an investment bank; project to overhaul the legacy reporting and analytics platform. 

Statistician within the Government Statistical Service; quantitative analysis and publishing statistical findings of emerging levels of council tax data. 

Structured Credit Product Control at an investment bank; developing, maintaining, and deploying a PnL platform for the CVA Hedging trading desk.