Rrrrrr…… now we know what it is but how the heck do you use it? Andrew Trant PPS Arctic - Labrador Highlands Research Group.

Slides:



Advertisements
Similar presentations
A gentle introduction to R – how to load in data and produce summary statistics BRC MH Bioinformatics group.
Advertisements

Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
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.
Windows XP / Microsoft Word Computer Applications.
Introduction to Matlab
Introduction to R Graphics
Chapter 2 Minitab for Data Analysis KANCHALA SUDTACHAT.
R tutorial g/methods2.2010/R-intro.pdf.
Chapter 8 and 9 Review: Logical Functions and Control Structures Introduction to MATLAB 7 Engineering 161.
WFM 6311: Climate Risk Management © Dr. Akm Saiful Islam WFM 6311: Climate Change Risk Management Akm Saiful Islam Lecture-5b: Quality Controlling Observational.
Chapter 1 Introduction to Spreadsheet. Agenda Download the practice files Spreadsheet application Workbook and worksheet Toolbar Cell Formatting Printing.
Learning Objectives In this chapter you will learn about the importance of variation how to measure variation range variance standard deviation.
Intro. To GIS Lecture 6 Spatial Analysis April 8th, 2013
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Job Description Report Generation. Job Description Reporting Click on Manage JD and select JD Report.
Center for Earned Value Management wInsight – “How to Use” Guide
Basic R Programming for Life Science Undergraduate Students Introductory Workshop (Session 1) 1.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
ALEXANDER C. LOPILATO R: Because the names of other stat programs don’t make sense so why should this one?
732A44 Programming in R.  Self-studies of the course book  2 Lectures (1 in the beginning, 1 in the end)  Labs (computer). Compulsory submission of.
Introduction to to R Emily Kalah Gade University of Washington Credit to Kristin Siebel for development of much of this PowerPoint.
Introduction to R Part 2. Working Directory The working directory is where you are currently saving data in R. What is the current working directory?
Arko Barman with modification by C.F. Eick COSC 4335 Data Mining Spring 2015.
WEKA - Explorer (sumber: WEKA Explorer user Guide for Version 3-5-5)
Welcome!. Print Options PDF Comma-Separated Values (CSV) Formatted Excel New Features in Analysis.
Univariate Graphs III Review Create histogram from Commands Window. Multipanel histogram. Quantile Plots Quantile-Normal Plots Quantile-Quantile Plots.
Introduction to R Lecture 3: Data Manipulation Andrew Jaffe 9/27/10.
Excel Ch 6 Review.
Applied Bioinformatics Introduction to R, continued Bing Zhang Department of Biomedical Informatics Vanderbilt University
I❤RI❤R Kin Wong (Sam) Game Plan Intro R Import SPSS file Descriptive Statistics Inferential Statistics GraphsQ&A.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Matlab The language of Technical computing Mr. D. Suresh Assistant Professor, Dept. of CSE, PSNA CET, Dindigul.
Introduction to Programming in R Department of Statistical Sciences and Operations Research Computation Seminar Series Speaker: Edward Boone
VIDEO: INTRODUCTION TO STATA EMBA Data Analysis Professor Timothy Simcoe Boston University School of Management.
Learning R hands on. Organization of Folders: Class Data folder has datasets (end in.csv or.rda) Rcode has the scripts of R commands that can cut and.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
A simple classification problem Extract attributes Pattern Pattern recognition decision x C1 C2.
DTC Quantitative Methods Summary of some SPSS commands Weeks 1 & 2, January 2012.
R objects  All R entities exist as objects  They can all be operated on as data  We will cover:  Vectors  Factors  Lists  Data frames  Tables 
R Workshop #2 Basic Data Analysis. What we did last week: Understand the basics of how R works Generated objects (vectors, matrices, etc.) Read in data.
Data & Graphing vectors data frames importing data contingency tables barplots 18 September 2014 Sherubtse Training.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
How to Create a form using the Program Excel By Mrs Douglas 8/1/10.
Lab 9: practice with functions Some tips to make your functions a little more interesting.
Descriptive Statistics using R. Summary Commands An essential starting point with any set of data is to get an overview of what you are dealing with You.
MIS2502: Data Analytics Introduction to Advanced Analytics and R.
Statistical Programming Using the R Language Lecture 2 Basic Concepts II Darren J. Fitzpatrick, Ph.D April 2016.
EMPA Statistical Analysis
DATA MANAGEMENT MODULE: USING SQL in R
Sihua Peng, PhD Shanghai Ocean University
Getting your data into R
Introduction to R Commander
Summary Statistics in R Commander
like you to do and submit as well.
Univariate Data Exploration
Microsoft Excel 101.
Rrrrrr…… now we know what it is but how the heck do you use it?
Sihua Peng, PhD Shanghai Ocean University
Minitab Instructions Covered
Basics of R, Ch Functions Help Managing your Objects
CSCI N317 Computation for Scientific Applications Unit R
How to Create a Microsoft Access 2007 Database
How to run and format reports for your Local Board of Health
MIS2502: Data Analytics Introduction to R and RStudio
MIS2502: Data Analytics ICA #7 Introduction to R and RStudio - Recap
Comparing Two Variables
Center for Earned Value Management wInsight – “How to Use” Guide
Step 1:. Open Microsoft FrontPage application.
R tutorial
MATH 2311 Section 8.6.
Presentation transcript:

Rrrrrr…… now we know what it is but how the heck do you use it? Andrew Trant PPS Arctic - Labrador Highlands Research Group

I) get data II) get data organized and formatted III) import data First things first

I) get data II) get data organized and formatted III) import data First things first

Save as.csv file

I) get data II) get data organized and formatted III) import data First things first

Importing data into R -open R and save workspace astest.Rdata #make sure you save workspace image -go into data folder and open ‘test.Rdata’ >read.csv(“ReefFishAbundance.csv”) REMEMBER: nothing is saved into the workspace environment unless you assign it a name >fish<-read.csv(“ReefFishAbundance.csv”)

‘R’udimentary Some things to try: >ls() ……………………………… Lists objects >names(fish) ………….……….Lists variables >junk summary(fish) ………….…… Descriptive stats >ls() >rm(junk) ……………………... Removes from ls() >rm(list=ls()) …………………. Clears workspace PERMANENTLY

‘R’ows then columns Manipulating data.frame: >fish[1,2] …………...row 1, column 2 >fish[1:3,5] …………rows 1,2,3 column 5 >fish[1,c(3,5:6)] …….row 1 columns 3,5,6 >fish[1,-c(5:6)] …….. row 1 and NOT columns 5,6 c = combine

‘R’ussian dolls Subsetting data: >subset(fish,year==1) ……….…….. equal to 1 >subset(fish,year!=1) ……………… NOT equal 1 >subset(subset(fish,year==2),N>170)

Tables From dataset airquality (preloaded): >airquality #confusing >with(airquality,table(Temp,Month)) #better >with(airquality, table(cut(Temp, quantile(Temp)), Month)) #best #’quantile’ breaks Temp range into 4 equal parts

Mo’R’e Tables > airtable margin.table(airtable) >margin.table(airtable,1) #sum by rows >margin.table(airtable,2) #sum by columns >prop.table(airtable) >prop.table(airtable,1) #prop by row >prop.table(airtable,2) #prop by column >summary(airtable) #Chi-squared test

Conspi’R’ing (or plotting) Low level: plot, hist, barplot…. High level: xyplot, dotplot, densityplot, contour, cloud from packages, must install ‘LATTICE’ examples: >with(fish,plot(N~transect,xlab=“transect #”, ylab=“N”)) > bwplot(voice.part ~ height, data=singer, xlab="Height (inches)") >contour

Saving you’R’ plot Plot something example: >bwplot(voice.part ~ height, data=singer, xlab="Height”) Make it the active window (ie. click on it)

You’R’ own function >testplot fix(testplot) >function(){with(fish,plot(N~transect))} to execute the function: >testplot() to review your function: >testplot

‘R’ecap -Find, organize, import data -Manipulate, subset -Make tables -Generate plots and save plots -Make yer very own function WHAT ELSE IS THERE?

Shutting down I) Save history file example: oct19.History II) Save workspace file example: test.Rdata III) Close the window and save workspace image