1 Statistics 517 Computing in Statistics © Fall 2004 Don Edwards and the University of South Carolina.

Slides:



Advertisements
Similar presentations
An Introduction to R: Logic & Basics. The R language Command line Can be executed within a terminal Within Emacs using ESS (Emacs Speaks Statistics)
Advertisements

R for Macroecology Aarhus University, Spring 2011.
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
ENG004 ALGORITHMS & INT. TO PROGRAMMING Week 3 “An introduction to arrays and matrices” Ahmet Anıl Dindar
Simple Introduction to Clojure with Analysis By: Shannon Birchell.
Maths for Computer Graphics
1 Ch 7-8 lArithmetic lLogical Operators © Fall 2004 Don Edwards and the University of South Carolina.
General Computer Science for Engineers CISC 106 Lecture 04 Roger Craig Computer and Information Sciences 9/11/2009.
CIS 101: Computer Programming and Problem Solving Lecture10 Usman Roshan Department of Computer Science NJIT.
Lecture 4 Sept 8 Complete Chapter 3 exercises Chapter 4.
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
1 Basics of R, Ch lFunctions lHelp lManaging your Objects lGetting Data into R lGetting Results out of R © Fall 2004 Don Edwards and the University.
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
Introduction to Computing Dr. Nadeem A Khan. Lecture 24.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
Lecture 7 Sept 19, 11 Goals: two-dimensional arrays (continued) matrix operations circuit analysis using Matlab image processing – simple examples Chapter.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
1 Ch 12 Function writing lInputting functions lFunction writing examples lPooled t-test lPlotting © Fall 2004 Don Edwards and the University of South Carolina.
Concatenation MATLAB lets you construct a new vector by concatenating other vectors: – A = [B C D... X Y Z] where the individual items in the brackets.
Dr. Jie Zou PHY Welcome to PHY 3320 Computational Methods in Physics and Engineering.
1 Ch 9-10 lSubsetting lOrdering lArray operations lIteration © Fall 2004 Don Edwards and the University of South Carolina.
Programming with MATLAB. Relational Operators The arithmetic operators has precedence over relational operators.
EGR 106 – Week 3 – More on Arrays Brief review of last week Additional ideas: – Special arrays – Changing an array – Some array operators – Character arrays.
How to Use the R Programming Language for Statistical Analyses Part I: An Introduction to R Jennifer Urbano Blackford, Ph.D. Department of Psychiatry Kennedy.
Introduction to R: The Basics Rosales de Veliz L., David S.L., McElhiney D., Price E., & Brooks G. Contributions from Ragan. M., Terzi. F., & Smith. E.
Lists in Python.
Introduction to to R Emily Kalah Gade University of Washington Credit to Kristin Siebel for development of much of this PowerPoint.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Data Objects in R Vector1 dimensionAll elements have the same data types Data types: numeric, character logic, factor Matrix2 dimensions Array2 or more.
Arrays and 2D Arrays.  A Variable Array stores a set of variables that each have the same name and are all of the same type.  Member/Element – variable.
CompSci Today’s topics Java Review Just a bunch of headings meant to trigger questions A contraction of previous notes Upcoming Midterm Exam Reading.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
R Programming Yang, Yufei. Normal distribution.
Chapter 4 Review: Manipulating Matrices Introduction to MATLAB 7 Engineering 161.
Introduction to R. Why use R Its FREE!!! And powerful, fairly widely used, lots of online posts about it Uses S -> an object oriented programing language.
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
CS 106 Introduction to Computer Science I 10 / 29 / 2007 Instructor: Michael Eckmann.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
STAT 534: Statistical Computing Hari Narayanan
Matlab Basic. MATLAB Product Family 2 3 Entering & Quitting MATLAB To enter MATLAB double click on the MATLAB icon. To Leave MATLAB Simply type quit.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 6: Debugging in MATLAB Monday 15 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
Section 9-1 An Introduction to Matrices Objective: To perform scalar multiplication on a matrix. To solve matrices for variables. To solve problems using.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
S-PLUS Lecture 4 Jaeyong Lee Pennsylvania State University.
Array Accessing and Strings ENGR 1187 MATLAB 3. Today's Topics  Array Addressing (indexing)  Vector Addressing (indexing)  Matrix Addressing (indexing)
Engineering Computing I Chapter 5 Pointers and Arrays.
Arrays and variables 1.Representing tables as arrays in MATLAB 2.Concept of array dimension 3.Correspondence of array dimension to rows and columns 4.Picking.
Lecture 11 Introduction to R and Accessing USGS Data from Web Services Jeffery S. Horsburgh Hydroinformatics Fall 2013 This work was funded by National.
Working with data in R 2 Fish 552: Lecture 3. Recommended Reading An Introduction to R (R Development Core Team) –
Introduction to R and Data Science Tools in the Microsoft Stack Jamey Johnston.
Programming in R Intro, data and programming structures
Introduction Osborn.
Introduction to MATLAB
Have you signed up (or had) your meeting?
Ch 7-8 Arithmetic Logical Operators
Chapter 1: Introduction to SAS
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
CSCI N207 Data Analysis Using Spreadsheet
Statistics 540 Computing in Statistics
Communication and Coding Theory Lab(CS491)
Basics of R, Ch Functions Help Managing your Objects
Ch 9-10 Subsetting Ordering Array operations Iteration
Introduction to MATLAB
R Course 1st Lecture.
Introduction to Matlab
Creating a dataset in R Instructor: Li, Han
Presentation transcript:

1 Statistics 517 Computing in Statistics © Fall 2004 Don Edwards and the University of South Carolina

2 Course Goals lR (=Splus) programming lSAS programming (DATA step) Syllabus l lRead it carefully!

3 A Typical Class lDiscuss previous coding exercise (10 min) lCoding discussion and demonstration (25-40 min) lAssign coding exercise lTime spent on exercises is “built in” to class time

4 Learning R lDon Edward’s notes lSupplemental exercises lMany other R resources available online

5 Basics of R, Chapters lIntro to R lObjects, Modes, Assignments lGetting Help

6 1. R: An Introduction lShareware version of S (  Splus) lVersion for Windows lSteep learning curve (case sensitive, cryptic help and error messages, data import and export)

7 1. R: An Introduction lStarting and quitting lObject oriented lVectors, factors, matrices, data frames, lists, functions lR object names are flexible lBe careful of built-in R names lDon’t let objects accumulate

8 2.1 Vectors lStrings of data elements of the same mode lMajor modes: numeric, character, logical lExamples from R data sets

9 2.1 Vectors lComponent extraction lAssignments (beware copying over variables!) lObject attributes (e.g. names) llength(), c(), “:”, seq() functions lNo shorthand for increments in “:” statement lFunctions can be nested

Factors lDefines groups in data (looks like a character vector, but no quotes) lLevels lCoercing to a character vector lOther coercion functions

Matrices lTwo-dimensinal array; columns have same mode (usually numeric) lAttributes: dim and dimnames lCaution about length() lExtracting a single element, or an entire row or column

Data Frames lR’s standard “data set” lTwo-dimensional array but columns may have different modes lAttributes: names, row.names lReferencing columns with $ lConversion of character vectors to factor objects by data.frame()

Lists lGlued-together strings of diverse objects lOutput of many R functions lE.g., attributes of any object lExtraction with [[ ]] lExtraction with $