About this ebook
R programming has gained importance in different fields due its flexibility, rich packages, platform independent characteristics, data analysis & data visualization capabilities and building various models like machine learning models. It facilitates the incorporation of codes of other languages such as C, C++ and Java in its programming environment.
R programming is an open source platform which is developed by Ross Ihaka and Robert Gentleman from University of Auckland during the year 1991. It is a modified version of S language developed during 1976 by Bell Laboratories in USA. Currently the development process is being handled by the R core development team.
The book starts with the basic concepts such as vectors, objects, factors, data frames, lists, reading data and writing data files, conditions, controls, functions and handling database connections.
Book covers the R Programming rich graphical and data visualization tools, and web applications.
Statistical concepts such as Descriptive, Inferential, and regression models are also covered. It also includes Machine Learning models such as classification and clustering models.
Editor IJSMI,
International Journal of Statistics and Medical Informatics
Editor IJSMI
Editor, International Journal of Statistics and Medical Informatics www.ijsmi.com/book.php [email protected]
Other titles in R Programming - a Comprehensive Guide Series (3)
R Programming - a Comprehensive Guide: Software Rating: 0 out of 5 stars0 ratingsOverview Of Bayesian Approach To Statistical Methods: Software Rating: 0 out of 5 stars0 ratingsIntroduction To Business Statistics Through R Software: Software Rating: 0 out of 5 stars0 ratings
Read more from Editor Ijsmi
Forecasting Models – an Overview With The Help Of R Software Rating: 0 out of 5 stars0 ratings
Related to R Programming - a Comprehensive Guide
Titles in the series (3)
R Programming - a Comprehensive Guide: Software Rating: 0 out of 5 stars0 ratingsOverview Of Bayesian Approach To Statistical Methods: Software Rating: 0 out of 5 stars0 ratingsIntroduction To Business Statistics Through R Software: Software Rating: 0 out of 5 stars0 ratings
Related ebooks
Learn R Programming in 24 Hours Rating: 0 out of 5 stars0 ratingsData Science Fundamentals and Practical Approaches: Understand Why Data Science Is the Next (English Edition) Rating: 0 out of 5 stars0 ratingsPractical Data Science Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsMachine Learning with R - Third Edition: Expert techniques for predictive modeling, 3rd Edition Rating: 0 out of 5 stars0 ratingsGetting Started with Python Data Analysis Rating: 0 out of 5 stars0 ratingsBayesian Analysis with Python Rating: 4 out of 5 stars4/5Practical Data Analysis Rating: 4 out of 5 stars4/5Data Science with Jupyter: Master Data Science skills with easy-to-follow Python examples Rating: 0 out of 5 stars0 ratingsLearning Bayesian Models with R Rating: 5 out of 5 stars5/5Introduction to Statistics: An Intuitive Guide for Analyzing Data and Unlocking Discoveries Rating: 5 out of 5 stars5/5R Data Science Essentials: R Data Science Essentials Rating: 2 out of 5 stars2/5Data Preparation and Exploration: Applied to Healthcare Data Rating: 0 out of 5 stars0 ratingsPrinciples of Data Science Rating: 4 out of 5 stars4/5Hands-On Time Series Analysis with R: Perform time series analysis and forecasting using R Rating: 0 out of 5 stars0 ratingsLearning pandas - Second Edition Rating: 4 out of 5 stars4/5R All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsMastering pandas for Finance Rating: 0 out of 5 stars0 ratingsNumPy: Beginner's Guide - Third Edition Rating: 4 out of 5 stars4/5Mastering Pandas in Python: Course Book Rating: 0 out of 5 stars0 ratingsMastering Time Series Analysis and Forecasting with Python Rating: 0 out of 5 stars0 ratingsR Graph Essentials Rating: 0 out of 5 stars0 ratingsLearning Quantitative Finance with R Rating: 4 out of 5 stars4/5Python Machine Learning By Example: Unlock machine learning best practices with real-world use cases Rating: 0 out of 5 stars0 ratingsMastering Machine Learning with R - Second Edition Rating: 0 out of 5 stars0 ratingsHands-On Machine Learning with Microsoft Excel 2019: Build complete data analysis flows, from data collection to visualization Rating: 0 out of 5 stars0 ratings
Programming For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Python All-in-One For Dummies Rating: 5 out of 5 stars5/5PYTHON PROGRAMMING Rating: 4 out of 5 stars4/5Learn Python in 10 Minutes Rating: 4 out of 5 stars4/5SQL Mastermind: Unleashing the Power of Advanced Database Programming Rating: 2 out of 5 stars2/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5TensorFlow in 1 Day: Make your own Neural Network Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Galaxy AI Unlocked: Discover What Makes Your Samsung Device Truly Smart Rating: 0 out of 5 stars0 ratingsExcel 2021 Rating: 4 out of 5 stars4/5User Journey Mapping Rating: 0 out of 5 stars0 ratingsC Programming For Dummies Rating: 0 out of 5 stars0 ratingsArtificial Intelligence with Python Rating: 4 out of 5 stars4/5Blender 3D Printing Essentials Rating: 0 out of 5 stars0 ratingsBeginners' Artificial Intelligence and Python Programming Rating: 0 out of 5 stars0 ratingsPython Machine Learning Illustrated Guide For Beginners & Intermediates:The Future Is Here! Rating: 5 out of 5 stars5/5Arduino: The complete guide to Arduino for beginners, including projects, tips, tricks, and programming! Rating: 4 out of 5 stars4/5Internet of Things (IoT) A Quick Start Guide: A to Z of IoT Essentials Rating: 0 out of 5 stars0 ratings
Reviews for R Programming - a Comprehensive Guide
0 ratings0 reviews
Book preview
R Programming - a Comprehensive Guide - Editor IJSMI
Chapter 1 – Introduction
Ris a programming language and environment which is widely used in different fields. It was developed by Ross Ihaka and Robert Gentleman from University of Auckland. R is one of the versions of S language which is developed by the Bell laboratories in United States of America.
R core development team monitors the development process. R language contents are updated by its vast community of users through the modules called ‘packages’. R language is frequently updated and the recent version 4.0.0 as of April 2020. R environment has some built in packages and more packages can be downloaded from The Comprehensive R Archive Network (CRAN) website (https://cran.r-project.org/).
R programming is platform independent and can be deployed in any operating system. It is compatible with other languages such as Java and Python programing.
R lets the users to modify the existing packages and allows them to update with their own codes and functions thus offering greater flexibility in programming.
R Programming language is helpful for data handling, data visualization and data analysis capabilities. It also includes reporting and dash board features.
R is mainly useful for carrying out statistical analysis such as descriptive, inferential, regression modelling, clustering, discriminant analysis, factor analysis and survival analysis.
Getting started
R recent version can be downloaded from cran-r project website (https://cran.r-project.org/).
R Environment
The GUI version of R environment
There are Integrated Development Environment is available for R such as R-Studio and Rattle which provides Graphical User Interface (GUI) to the R environment. Both the IDEs are also freely available for download.
Apart from the above R Commander an interface for R environment provides GUI as well as menu based application for frequently used functions such as statistical functions along with the facility to write r codes.
R-Studio
Writing code in the R Studio
R studio has the following four default windows (panes) with each having sub tabs in it
Top left
Source
Bottom Left
Console
Terminal
Jobs
Top Right
Environment
History
Connection
Bottom right
Files
Plots
Packages
Help
Viewer
Find out version of R
After installing R and R studio we can what R version we have installed by executing the following code. It also provides the base packages which are attached the R environment. To execute a statement or block of statement we can use the run
symbol in the source window(pane) or(CTRL+enter) to execute the code.
Writing Codes for execution in R studio
Users can start writing their codes or statements in the Ssource window which is located at the top left window.
There are built in functions available in the R ‘base’ package which can be viewed by executing the following help code. One need to invoke the library function to start the execution related to a package
Similarly we can use library (help=stats
) to see the functions associated with the package stats
Getting help
If want to know about any specific package or function we can use the help menu in the right bottom window (pane). We can search using specific function name such as sum in the search box.
Saving R files
By default R programming files are saved with .R extension which is nothing but the R script file. Files can be saved with following extensions also which will be discussed in detail in the later chapters.
.r – R script file
.rmd – R markdown file
.rnw – R Sweave file
Creating working directory
We can set the working directory by using the statement setwd along with the path reference to the working directory.
Installing packages
Packages or modules can be installed using install.packages statement or through R studio’s Tools - install packages menu
Calling packages to the R environment
library statement is used to call the packages into R environment
REFERENCE
https://cran.r-project.org/
R Core Team (2017). R: A language and environment for
statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL
