0% found this document useful (0 votes)
16 views

r programming 1st lab program

jntuh r progrm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

r programming 1st lab program

jntuh r progrm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Download and install R-Programming environment and install basic packages using
install. packages () command in R.

Introduction to R programming:

R is a programming language and free software developed by Ross Ihaka and Robert Gentleman in 1993. R
possesses an extensive catalog of statistical and graphical methods. It includes machine learning algorithms,
linear regression, time series, statistical inference to name a few. Most of the R libraries are written in R, but
for heavy computational tasks, C, C++ and Fortran codes are preferred. R is not only entrusted by academic,
but many large companies also use R programming language, including Uber, Google, Airbnb, Facebook
and so on.

Data analysis with R is done in a series of steps; programming, transforming, discovering, modeling and
communicate the results.
Program: R is a clear and accessible programming tool

Transform: R is made up of a collection of libraries designed specifically for data science

Discover: Investigate the data, refine your hypothesis and analyze them

Model: R provides a wide array of tools to capture the right model for your data

Communicate: Integrate codes, graphs, and outputs to a report with R Markdown or build Shiny apps to
share with the world

What is R used for?

Statistical inference
Data analysis
Machine learning algorithm

Installation of R-Studio on windows:

Step – 1: With R-base installed, let’s move on to installing RStudio. To begin, goto
download RStudio and click on the download button for RStudio desktop.
Step – 2: Click on the link for the windows version of RStudio and save the .exe file.Step – 3:

Run the .exe and follow the installation instructions.

3. Click Next on the welcome window.

Enter/browse the path to the installation folder and click Next to proceed.
Select the folder for the start menu shortcut or click on do not create shortcuts and thenclickNext.

Wait for the installation process to complete.


Click Finish to end the installation.

Install the R Packages:-


In RStudio, if you require a particular library, then you can go through the following
instructions:

• First, run R Studio.


• After clicking on the packages tab, click on install. The following dialog box
will appear.
• In the Install Packages dialog, write the package name you want to install
under the Packages field and then click install. This will install the
package you searched for or give you a list of matching packages based
on your package text.

Installing Packages:-
The most common place to get packages from is CRAN. To install packages from CRAN you
use install.packages("package name"). For instance, if you want to install the ggplot2
package, which is a very popular visualization package, you would type the following in the
console:-
Syntax:-
# install package from
CRAN
install.packages("ggpl
ot2") Loading
Packages:-
Once the package is downloaded to your computer you can access the functions and
resources provided by the package in two different ways:
# load the package to use in the current R
sessionlibrary(package ename)
Getting Help on Packages:-
For more direct help on packages that are installed on your computer you can use the help
and vignette functions. Here we can get help on the ggplot2 package with the following:
help(package = "ggplot2") # provides details regarding contents of a package
vignette(package = "ggplot2") # list vignettes available for a specific package
vignette("ggplot2-specs") # view specific vignette
vignette() # view all vignettes on your computer

You might also like