Lecture 2: Programming in R

Slides:



Advertisements
Similar presentations
Introduction to R Brody Sandel. Topics Approaching your analysis Basic structure of R Basic programming Plotting Spatial data.
Advertisements

Introduction to S-Plus by Francesco Ferretti Analysis of Biological Data Course Winter term 2007 Dalhousie University.
R for Macroecology Aarhus University, Spring 2011.
Writing functions in R Some handy advice for creating your own functions.
SHOU Haochang ( 寿昊畅 ) Department of Biostatistics, Johns Hopkins Bloomberg School of Public Health July 11th, 2011 Nanjing University, China *Thanks to.
General Computer Science for Engineers CISC 106 Lecture 04 Roger Craig Computer and Information Sciences 9/11/2009.
An introduction to R Honors 207 Cognitive Science (These Slides were Shamelessly Stolen from Dr. Pablo Gomez, DePaul University)
2’s Complement 4-Bit Saturator
Lecture#6: segmentation Anat Levin Introduction to Computer Vision Class Fall 2009 Department of Computer Science and App math, Weizmann Institute of Science.
T T07-01 Sample Size Effect – Normal Distribution Purpose Allows the analyst to analyze the effect that sample size has on a sampling distribution.
Materials for Lecture 13 Purpose summarize the selection of distributions and their appropriate validation tests Explain the use of Scenarios and Sensitivity.
Innovations in Justice Information Sharing Strategies and Best Practices February 2007 Melissa R. Johnson, CCA Communications Director, International Association.
What is R Muhammad Omer. What is R  R is the programing language software for statistical computing and data analysis  The R language is extensively.
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)
SAS Workshop Lecture 1 Lecturer: Annie N. Simpson, MSc.
Programming in R Getting data into R. Importing data into R In this session we will learn: Some basic R commands How to enter data directly into R How.
Innovations in Justice Information Sharing Strategies and Best Practices November 30, 2006 Lisa M. Palmieri, CCA-Supervisory Intelligence Analyst President,
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
Numerical Computation Lecture 2: Introduction to Matlab Programming United International College.
R Programming Yang, Yufei. Normal distribution.
Scope When we create variables and functions, they are limited in where they are visible and where they can be referenced For the most part, the identifiers.
© 2011 IBM Corporation STEM One industry perspective Maria Hernandez IBM Corp. Director, Strategy and Transformation January 2012.
What’s Right with Undergraduate Statistics? Amy G. Froelich Department of Statistics Iowa State University USCOTS 2015.
My Python Programmes NAME:.
+ Part I. + R Developed by Ross Ihaka and Robert Gentleman at the University of Auckland, NZ Open source software environment for statistical computing.
© 2015 by Wade Rogers Introduction to R Cytomics Workshop December, 2015.
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
S-PLUS Lecture 4 Jaeyong Lee Pennsylvania State University.
Training Data Scientists DELSA Workshop DW4 May Washington DC Geoffrey Fox Informatics, Computing.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Introduction to R Aedín Culhane
Files in Python Opening and Closing. Big Picture To use a file in a programming language – You have to open the file – Then you process the data in the.
Statistical Genomics Zhiwu Zhang Washington State University Lecture 29: Bayesian implementation.
Statistical Genomics Zhiwu Zhang Washington State University Lecture 7: Impute.
Leveraging R and Shiny for Point and Click ADaM Analysis
Lecture 10: GWAS by correlation
CSCE 587: Big Data Analytics
Introduction to programming in java
Flowchart Symbols Terminal Process Input/ Output Decision
Lecture 4: Statistical inference
Lecture 2: Programming in R
Washington State University
What is Business Intelligence?
Lecture 10: GWAS by correlation
Lecture 2: Programming in R
R Programming Language
Here is the graph of a function
Christopher W.V. Hogue, Ph.D
Lecture 10: GWAS by correlation
Notes Over 2.1 Function {- 3, - 1, 1, 2 } { 0, 2, 5 }
Washington State University
Structured Program Design
Installing Packages Introduction to R, Part II
Lecture 10: GWAS by correlation
Analytics vs Statistics the problem is…
Lecture 16: Likelihood and estimates of variances
Solution 7 1. a). The scatter plot or the residuals vs fits plot
What’s Needed in a Second Statistics Class to Prepare Undergraduates for a Data Analytics Environment? A Panel Discussion at Decision Sciences Institute.
Inputs & Outputs Inside your computer video.
Lecture 7 – Delivering Results with R
AAE 556 Aeroelasticity Lecture 8
Programming For Big Data
R Course 1st Lecture.
CSE 5290: Algorithms for Bioinformatics Fall 2009
Objective- To graph a relationship in a table.
Lecture 29: Bayesian implementation
The Python interpreter
Line Graphs.
Polynomial investigation
Presentation transcript:

Lecture 2: Programming in R Statistical Genomics Lecture 2: Programming in R Zhiwu Zhang Washington State University

Current and future needs "By 2018, the US alone could face a shortage of 1.5 million managers and analysts with the know-how to investigate big data to make effective decisions" -McKinsey Global Institute, 2014 report

R You Ready for R? http://www.analyticsvidhya.com/blog/2014/03/sas-vs-vs-python-tool-learn/

R You Ready for R? http://www.analyticsvidhya.com/blog/2014/03/sas-vs-vs-python-tool-learn/

Robert Gentleman and Ross Ihaka Start with S in 1996 Open source Open packages

IF if(distribution=="norm") {addeffect=rnorm(NQTN,0,1) }else {addeffect=alpha^(1:NQTN)}

Function phenoSimu=function(X,h2,alpha,NQTN,distibution,seed){ Define function here }

List return(list(addeffect = addeffect, y=y, add = effect, residual = residual, QTN.position=QTN.position, SNPQ=SNPQ))

Loop myNQTL=c(3,10,20,50,100,200) for(i in 1:length(myNQTL)) { myv=validation(n=n,m=m,y=myps$y,X=X,residual=myps$residual,effect=myps$add,QTN.position=myps$QTN.position,addeffect=myps$addeffect,NQTL=myNQTL[i]) print(c(i,myNQTL[i],myv$fit,myv$accuracy)) }

Demonstration

Highlight File input and output R objects myF$p IF and Loop Apply numeric vs. character vector, matrix, and data.frame, list myF$p IF and Loop Apply Graph Function