Using R for Data Analysis and Data Visualization

Slides:



Advertisements
Similar presentations
A very short introduction to R Pia Wohland. R is… -A statistical software -Programming language -Free! -Very good in handling and manipulating data sets.
Advertisements

Introduction to S-Plus by Francesco Ferretti Analysis of Biological Data Course Winter term 2007 Dalhousie University.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
An Introduction to spss & endnote
 Statistics package  Graphics package  Programming language  Can be used to share/reproduce analyses  Many new packages being created - can be downloaded.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
R Mohammed Wahaj. What is R R is a programming language which is geared towards using a statistical approach and graphics Statisticians and data miners.
Ann Arbor ASA ‘Up and Running’ Series: SPSS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with.
Introduction to R A. Di Bucchianico. Introduction to R2 Types of statistical software command-line software –requires knowledge of syntax of commands.
RESEARCH HUB AT THE UNIVERSITY LIBRARIES PENN STATE UNIVERSITY TOUR OF STATISTICAL PACKAGES.
Introduction to R Statistical Software Anthony (Tony) R. Olsen USEPA ORD NHEERL Western Ecology Division Corvallis, OR (541)
Linux Operations and Administration
PyCON 2010 Author: Sidnei Budiman.  Your Average Programmer  One of the stereotypical 3 guys in a garage Currently working on building our own company.
1 An Introduction – UCF, Methods in Ecology, Fall 2008 An Introduction By Danny K. Hunt & Eric D. Stolen Getting Started with R (with speaker notes)
 Overview of SPSS  Interface  Getting Started  Managing Data  Descriptive Statistics  Basic Analysis  Additional Resources.
An introduction to R: get familiar with R Guangxu Liu Bio7932.
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
CENT 305 Information Systems Security Linux Introduction.
Piotr Wolski Introduction to R. Topics What is R? Sample session How to install R? Minimum you have to know to work in R Data objects in R and how to.
Using Software in Teaching Statistics Damon Berridge, Centre for Applied Statistics, Dept of Mathematics & Statistics ESRC NCRM.
Outline Comparison of Excel and R R Coding Example – RStudio Environment – Getting Help – Enter Data – Calculate Mean – Basic Plots – Save a Coding Script.
I Power Higher Computing Software Development Development Languages and Environments.
An Introduction to R Statistical Computing AMS 597 Stony Brook University Spring 2009 By Tianyi Zhang.
Introduction to R Introductions What is R? RStudio Layout Summary Statistics Your First R Graph 17 September 2014 Sherubtse Training.
Learn R Toolkit D Kelly O'DayInstall & SetupMod 1 - Setup: 1 Module 1 Installing & Setting Up R Do See & HearRead Learn PowerPoint must be in View Show.
Introduction to CADStat. CADStat and R R is a powerful and free statistical package [
THE WINDOWS OPERATING SYSTEM Computer Basics 1.2.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Introductory Data Analysis F73DA2. Contact Times (Spring Term 2008) Monday 4: : Lecture in LT3 Tuesday 2: : Lecture in LT3 Wednesday
Introduction to R Aedín Culhane
With the support of the LPP programme of the European Union 1 This project has been funded with support from the European Commission. This publication.
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.
Statistical Exploratory Analysis with “EnQuireR” 1.Introduction 2.Installation 3.How to 4.Report.
Getting started with Matlab: Outline
Version Control Systems
Fundamental of Databases
Matlab Programming for Engineers
R Brown-Bag Seminar 2.1 Topic: Introduction to R Presenter: Faith Musili ICRAF-Geoscience Lab.
Introduction to InVEST ArcGIS Tool
An Eclipse Plugin for Creating Windows Graphical User Interfaces
Getting Started with R.
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Operating Systems Overview
Welcome to MATLAB.
Introduction to R Commander
Adventures in teaching and learning data analysis with R
Version Control Systems
Introduction to R Studio
Chapter 3 Software Interfaces.
R Programming.
Lecture 13 RPM and its advantages.
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
Matlab Workshop 9/22/2018.
How to enter the world of Python Programming for ArcGIS
An introduction to data analysis using R
Today’s Beginner Workshop
Code is on the Website Outline Comparison of Excel and R
Plotting Data with MATLAB
Digital Image Processing
CSCI N207 Data Analysis Using Spreadsheet
Configuration Of A Pull Network.
Scripts In Matlab.
This is where R scripts will load
R Statistical Language
Stata Basic Course.
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
An Eclipse Plugin for Creating Windows Graphical User Interfaces
Introduction To MATLAB
Basics of Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Presentation transcript:

Using R for Data Analysis and Data Visualization Instructor: Li, Han

What is R a calculator generate random variables/distributions, for example, normal distribution data visualization, that's, plot the data data analysis, for example, linear regression Almost all the things related to data analysis!

Why it is named R is named partly after the first names of the two authors who created it: Ross Ihaka and Robert Gentleman, at the University of Auckland, New Zealand, and partly as a play on the name of S language. The project was conceived in 1992, with an initial version released in 1994 and a stable beta version in 2000.

R's advantages Compared with other softwares, for instance, Excel SPSS SAS STATA MATLAB Why do we choose R?

R's advantages easy to install easy to learn, very flexible friendly graphical user interface (GUI) many contributed packages extremely popular It is free!

Installing R Website for downloading R: https://mirrors.tuna.tsinghua.edu.cn/CRAN/ There are different versions of R for different platforms, for example, windows/(Mac) OS X/linux.

After installing R, click it to begin use it.

R's GUI(Graphical User Interface)

Calculation 2+3 100-15 5*9 3/4 7%%2 ((1+2)*12-3*4)/2-8%%3 2^3 2^(-1) pi pi^3

exp(0) exp(1) log(1) log(2.718) log10(10) log2(4) log(9,base=3)

sin(0) sin(pi/2) sin(pi) sin(90) sin(90/180*pi) cos(0) cos(pi) tan(pi/4)

Variable assignment x<-1 y<-2 x y x=1 y=2 x+y x/y x*y

Script- a file ends with .R A script is a file that saves the codes to run. It could be a few lines, or a very large text file. It could be edited like a text file, for example, copy, paste, delete .... When running the R script, the console will run the codes line by line.

Build a new R script file

Save a R script file

Open an existing R script file

Workspace It is an environment that stores all defined objects, for example, x, y. To save the objects, click File -Save Workspace, and then save it as a file that ends with “.RData”. To load the objects, open R, click File - Load Workspace, and then choose the file that stores the objects.

Working directory Working directory is the current environment where R works, saves and reads varaibles or data by default. Use getwd() to see the working directory, setwd() to change the working directory.

History history() will show all the codes that were run in the console. Click “File - Save History”, then save the codes that were run in a file end with “.RHistory”. Click “File - Load History”, then load a R history file.

We can also save the history codes as a text file. Use “history()” to see all the codes in the R history window. Under the R history window, click “File - Save to File”, then save the codes as a file ended with “.txt”.

Package R comes with extensive capabilities right out of optional modules that you can download and install. There are over 2,500 user-contributed modules called packages that you can download from http://cran.r-project.org/web/packages

To see the packages already installed in R, use library() or installed.packages() To see the packages already loaded in R, use search()

How to install a package How to install a package called “gclus”? There are two ways. Use the code directly as follows. install.packages(“gclus”) Manually by clicking “Packages - install package(s)”, then choose the package “gclus” to install.

How to load a packge After installing the “gclus” package, if you want to use it, you need to use library(“gclus”) Then package “gclus” is loaded in the current environment, and you can acess its data and functions now.

help() If you want to see the details of a R function, for example, “mean”, use help(mean) or ?mean

Some tips for using R Ctrl+L= clear the console Ctrl+C=copy Ctrl+V=paste ls()=show all the existing variables rm(x)= delete the variable x rm(x,y)= delete the variable x and y

Summary how to install R R's advantages R's GUI environment Use R to do calculation build, open and save R's script/workspace/history install/load a R package use help() some tips Begin the journey to explore R. Have fun!