Introduction to R Dr. Satish Nargundkar. What is R? R is a free software environment for statistical computing and graphics. It compiles and runs on a.

Slides:



Advertisements
Similar presentations
What is Computer Software?. Hardware vs Software Got to have both to get the job done!
Advertisements

PRE-SCHOOL QUANT WORKSHOP II R THROUGH EXCEL. NEW YORK TIMES INFOGRAPHICS GALARY The Jobless Rate for People Like You Home Prices in Selected Cities For.
 Statistics package  Graphics package  Programming language  Can be used to share/reproduce analyses  Many new packages being created - can be downloaded.
Ann Arbor ASA ‘Up and Running’ Series: SPSS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with.
R for Research Data Analysis using R Day1: Basic R Baburao Kamble University of Nebraska-Lincoln.
A Simple Guide to Using SPSS© for Windows
Introduction to SPSS Descriptive Statistics. Introduction to SPSS Statistics Program for the Social Sciences (SPSS) Commonly used statistical software.
EViews. Agenda Introduction EViews files and data Examining the data Estimating equations.
Introduction to SPSS Short Courses Last created (Feb, 2008) Kentaka Aruga.
An ide for teaching and learning prolog
Introduction to SPSS (For SPSS Version 16.0)
ATM 315 Environmental Statistics Course Goto Follow the link and then choose the desktop application.
ALEXANDER C. LOPILATO R: Because the names of other stat programs don’t make sense so why should this one?
Carolina Environmental Program UNC Chapel Hill The Analysis Engine – A New Tool for Model Evaluation, Sensitivity and Uncertainty Analysis, and more… Alison.
Introduction to SPSS Edward A. Greenberg, PhD
Data, graphics, and programming in R 28.1, 30.1, Daily:10:00-12:45 & 13:45-16:30 EXCEPT WED 4 th 9:00-11:45 & 12:45-15:30 Teacher: Anna Kuparinen.
SOFTWARE It Consists of a series of instructions that tells the computer what to do. It is collection of programs. Software is set of instruction which.
25th District Assembly 2015 – Save the Trees | 1.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools.
Outline Comparison of Excel and R R Coding Example – RStudio Environment – Getting Help – Enter Data – Calculate Mean – Basic Plots – Save a Coding Script.
Introduction to R Introductions What is R? RStudio Layout Summary Statistics Your First R Graph 17 September 2014 Sherubtse Training.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
CONTENT  Introduction Introduction  Operating System (OS) Operating System (OS) Operating System (OS)  Summary Summary  Application Software Application.
Introduction to Eviews Eviews Workshop September 6, :30 p.m.-3:30 p.m.
Before the class starts: 1) login to a computer 2) start RStudio 3) download Intro.R from MyCourses 4) open Intro.R in Rstudio 5) Download “R in Action”
MIS2502: Data Analytics Introduction to Advanced Analytics and R.
16BIT IITR Data Collection Module If you have not already done so, download and install R from download.
Create Online Surveys for Free by Using Google Documents
Block 1: Introduction to R
Matlab Programming for Engineers
EMPA Statistical Analysis
R Brown-Bag Seminar 2.1 Topic: Introduction to R Presenter: Faith Musili ICRAF-Geoscience Lab.
Nature & Types of Software
Understanding SPSS II Workshop Series July 19, 2017.
Using the Lego Mindstorms Edu NXT Software
Getting started with Stata
Introduction to R Carolina Salge March 29, 2017.
Getting Started with R.
By Dr. Madhukar H. Dalvi Nagindas Khandwala college
Guide To UNIX Using Linux Third Edition
Introduction to R Programming with AzureML
Introduction to R Commander
Introduction to Operating System (OS)
DEPARTMENT OF COMPUTER SCIENCE
Installing R and R Studio
Research methodology R Statistics – Introduction
R Programming.
ECONOMETRICS ii – spring 2018
Lab 1 Introductions to R Sean Potter.
Introduction to R.
An introduction to data analysis using R
Code is on the Website Outline Comparison of Excel and R
This is where R scripts will load
Tutorial 8 Table 3.10 on Page 76 shows the scores in the final examination F and the scores in two preliminary examinations P1 and P2 for 22 students in.
CSCI N207 Data Analysis Using Spreadsheet
Eviews Tutorial for Labor Economics Lei Lei
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
MIS2502: Data Analytics Introduction to R and RStudio
Amos Introduction In this tutorial, you will be briefly introduced to the student version of the SEM software known as Amos. You should download the current.
This is where R scripts will load
This is where R scripts will load
Biogeography analysis using R scripts
Stata Basic Course.
Data analysis with R and the tidyverse
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Microsoft Office Illustrated Fundamentals
Using R for Data Analysis and Data Visualization
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Research methodology R Statistics – Introduction
A brief introduction to the nutrient tool-kit, getting R Studio to work and checking the data Martyn Kelly
Presentation transcript:

Introduction to R Dr. Satish Nargundkar

What is R? R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. 2

Advantages of R Free and open source No license restrictions 4800 packages for specialized topics Runs on many operating systems Active user groups 3

Limitations of R R can consume all the available memory  Use 64 bit systems than 32 bit to solve problem String comparisons can be slow, numeric normal speed versus other software R slower for some matrix operations such as 4

Downloading R Windows(32/64 bits) R for Mac OS X Downloading R studio ad/ 5

Why get R studio? Ease of use Datasets readily accessible for viewing Commands at your finger tips Variable names at your fingertips Multiple windows for comprehensive view:  Script  Global Environment  Console  Home Screen 6

Screenshot for the script R script : Upper left hand corner of R studio screen Store all your commands in script 7

Screenshot for Global environment window Upper right hand corner of R-studio screen Shows al the datasets that have been imported and created through dataset transformations 8

Screenshot for Console R console: Lower left hand corner Runs your commands(Press enter) 9

Screenshot for Home Home: Lower right hand corner List of files you will have in your working directory 10

Reading data into R Set working directory through setwd(:/C…) Use forward slash while setting working directory Ensure dataset is in your working directory Save dataset as CSV file in your working directory Use import dataset option in R studio 11

Common Commands1 Getting list of variables Names(datasetname) Getting individual variable data column datasetname$variable Getting the metadata Summary(datasetname) Merging datasets: Totaldata<-merge(dataset1, dataset2, by = “common variable") Sorting Data attach(trainwhite) sorteddata<-data[order(variable),] Testing for missing values is.na(trainwhite) 12

Common Commands2 Finding variables that have missing values dataset[!complete.cases(dataset),] Regression regression1<-lm(y~ x1+ x2+ x3, data=dataset) Summary of regression Summary(regression1) Coefficients of regression Coefficients(regression1) Predicted values and residuals Fitted(regression1) Residuals(regression1) 2 way frequency table attach(trainwhite) freqtable<-table(pH,fixed_acidity) 13

Common commands 3 Making histograms hist(dataset$variable) Creating a graph Attach(datasetname) Plot(variable1, varaible2) abline(lm(v1~v2)) Title(“Regression of v1 on v2”) 14

Best Practices in R Use R studio to import dataset Convert dataset into CSV format before importing Use the online R communities for quick help, better than R’s help page Save scripts for common commands Make notes using ## for future reference Close all other work before using R, makes other things slower 15

Type the variable names as is (R is case sensitive) Common Errors: Watch out 16

References 17