How to install packages through local machine in R?
MACHINE LEARNING RECIPES DATA CLEANING PYTHON DATA MUNGING PANDAS CHEATSHEET     ALL TAGS

How to install packages through local machine in R?

How to install packages through local machine in R?

This recipe helps you install packages through local machine in R

0

Recipe Objective

R packages consists of a collection of R functions, data sets and compiled code which adds value to the existing R-functionalities. They are stored in the 'library' directory in the R-environment and developed by the community. For Example, "dplyr" is one of the commonly used packages in R which adds further functionalities with respect to working with dataframes.

There already exists some default packages in the local directory 'library' on your machine when you install R. We can see all the default packages by using code : 'library()'. If we want to add a new package, we can use three ways to do it:

  1. Directly from CRAN repository;
  2. From .zip file on your local machine;
  3. Via devtools package

This recipe demonstrates the installation and loading of a package from local machine using a .zip file. We can download a .zip file of a new package by acessing the following link: Visit R-Packages

Step 1: Installing packages

Once the file has been downladed, we use the command " install.packages("file name along with its PATH", repos = NULL, type = 'source') " to install from the local machine. Below is the code for installation of "MASS" .zip file from the link above.

install.packages("MASS_7.3-53.zip",repos = NULL, type = 'source')

Step 2: Loading a package

We use the function "library()" to load the package. It is essential to load the package before we can use it in your code.

library(MASS)

Relevant Projects

Data Science Project-TalkingData AdTracking Fraud Detection
Machine Learning Project in R-Detect fraudulent click traffic for mobile app ads using R data science programming language.

Loan Eligibility Prediction in Python using H2O.ai
In this loan prediction project you will build predictive models in Python using H2O.ai to predict if an applicant is able to repay the loan or not.

Data Science Project - Instacart Market Basket Analysis
Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

PySpark Tutorial - Learn to use Apache Spark with Python
PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

Machine Learning project for Retail Price Optimization
In this machine learning pricing project, we implement a retail price optimization algorithm using regression trees. This is one of the first steps to building a dynamic pricing model.

Deep Learning with Keras in R to Predict Customer Churn
In this deep learning project, we will predict customer churn using Artificial Neural Networks and learn how to model an ANN in R with the keras deep learning package.

Demand prediction of driver availability using multistep time series analysis
In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.

Predict Churn for a Telecom company using Logistic Regression
Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

Topic modelling using Kmeans clustering to group customer reviews
In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

Human Activity Recognition Using Multiclass Classification in Python
In this human activity recognition project, we use multiclass classification machine learning techniques to analyse fitness dataset from a smartphone tracker.