1 Basics of R, Ch 2.6-6 lFunctions lHelp lManaging your Objects lGetting Data into R lGetting Results out of R © Fall 2004 Don Edwards and the University.

Slides:



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

R for Macroecology Aarhus University, Spring 2011.
User Preferences – List Views Select “User Preference” from the File Menu.
Introduction to Matlab
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Basics of R, Ch  Functions  Help  Managing your Objects  Getting Data into R  Getting Results out of R 1 © Fall 2004 Don Edwards and the University.
Introduction to GTECH 201 Session 13. What is R? Statistics package A GNU project based on the S language Statistical environment Graphics package Programming.
1 Ch 11 Graphics lManaging graphics windows l1-d, 2-d and 3-d plotting lInteractive graphics © Fall 2004 Don Edwards and the University of South Carolina.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
1 Ch 12 Function writing lInputting functions lFunction writing examples lPooled t-test lPlotting © Fall 2004 Don Edwards and the University of South Carolina.
1 Statistics 517 Computing in Statistics © Fall 2004 Don Edwards and the University of South Carolina.
1 Ch 9-10 lSubsetting lOrdering lArray operations lIteration © Fall 2004 Don Edwards and the University of South Carolina.
Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences.
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.
Collections Management Museums Reporting in KE EMu.
Reporting in EMu Crystal != Reporting or Why is reporting so difficult and can we do anything about it? Bernard Marshall KE Software.
August 2011 InfoAssist Deployment Cookbook Presenters: John Sheridan, Manager of Business Technology & Development Georgina McLaughlin, Senior Business.
3. Functions and Arguments. Writing in R is like writing in English Jump three times forward Action Modifiers.
Integrating Microsoft Project with Other Programs
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Advanced Tutorial For Version 10.0 and later.
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.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
Intro to R R is a free version of S-plus R is a free version of S-plus Can be used interactively but script or syntax files are commonly used to record.
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.
Data Objects in R Vector1 dimensionAll elements have the same data types Data types: numeric, character logic, factor Matrix2 dimensions Array2 or more.
Using the R software R is an open source comprehensive statistical package, more and more used around the world. R project web site:
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
Hands-on Introduction to R. We live in oceans of data. Computers are essential to record and help analyse it. Competent scientists speak C/C++, Java,
SITES SOFTWARE APPLICATION SEMINAR __________________________ SITES INTEGRATED DEVELOPMENT ENVIRONMENT for WATER RESOURCE SITE ANALYSIS SITES.
Copyright 2007, Information Builders. Slide 1 Have You Heard What We're Doing About Section 508? Jeffrey Friedman Director of Advanced QA and Operations.
Javadoc A very short tutorial. What is it A program that automatically generates documentation of your Java classes in a standard format For each X.java.
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.
KNIME Quick explanation #1 Lance Norskog June 25, 2010.
Matlab Screen  Command Window  type commands  Current Directory  View folders and m-files  Workspace  View program variables  Double click on a.
Introduction to R Introductions What is R? RStudio Layout Summary Statistics Your First R Graph 17 September 2014 Sherubtse Training.
Structural Design Software TYLER HUTCHISON. Requirements  Develop an interface to generate a text file.  The text file is then passed to one of five.
IST 220 – Intro to Databases Lecture 2 Touring Microsoft Access.
INTRODUCTION TO MATLAB Dr. Hugh Blanton ENTC 4347.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
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 
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
B Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Working with PDF and eText Templates.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
Introduction to R Chris Free. Introduction to R Free! Superior (if not comparable) to commercial alternatives Available on all platforms Not just for.
Review > x[-c(1,4,6)] > Y[1:3,2:8] > island.data fishData$weight[1] > fishData[fishData$weight < 20 & fishData$condition.
Working with data in R 2 Fish 552: Lecture 3. Recommended Reading An Introduction to R (R Development Core Team) –
Introduction to Matlab
13.4 Product of Two Matrices
Chapter 5: Enhancing Your Output with ODS
Topics Graphical User Interfaces Using the tkinter Module
Prof. Mark Glauser Created by: David Marr
Introduction to Matlab
Ch 11 Graphics Managing graphics windows 1-d, 2-d and 3-d plotting
Matrix Multiplication
Introduction to R Studio
MATH 493 Introduction to MATLAB
CSCI N207 Data Analysis Using Spreadsheet
funCTIONs and Data Import/Export
Basics of R, Ch Functions Help Managing your Objects
CSCI N317 Computation for Scientific Applications Unit R
Ch 9-10 Subsetting Ordering Array operations Iteration
Spreadsheets, Modelling & Databases
Stat 251 (2009, Summer) Lab 2 TA: Yu, Chi Wai.
Unit J: Creating a Database
ME 123 Computer Applications I Lecture 4: Vectors and Matrices 3/14/03
P 72 (PDF 76) Figure 32 Information item name Rules in columns
Chapter 7 Section 7.2 Matrices.
Presentation transcript:

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 of South Carolina

2 2.6 Functions lInput arguments; output a new object (often a list) lRequired and optional arguments lBuilt-in R functions lOutput can depend on the object type lUser-designed functions

3 3 Help lhelp, help.search, ? lGenerates extensive help file with several standard headings lSome of most relevant info is hard to find (e.g., plot()) lExamples section is often disappointing

4 4 Managing Your Objects lSome of this info is for more sophisticated users lsearch() path lls() lattach(), detach() lattach() and source() are useful for reading files

5 4 Managing Your Objects lrm() lCreating a new workspace (.Rdata file) lWorking with R in a specified (non-default) workspace lManaging objects gets complex

6 5 Getting Data into R 5.1 Creating Data lc(), seq(), rep() lrnorm(), etc lCreating matrices with matrix()

7 5.2 The read.table() Function lStandardized text data form lbrainbod example las.is=T option lMissing values: NA lNo row names--header=T generates default integer row names lNo (column) names--a couple different options

8 5.3 The scan() Function lA typical big-data-set setting èThousands of records èMultiple lines per record èVariable-width fields lAdvanced feature lscan() can also be used for the simplest types of data entry

9 6. Getting Results Out of R lNot a strong point of R lOutputting matrices, data frames èt(), ncol èround(), signif() lFunctions: fix() lpostscript and pdf commands save graphs and pictures lOther simple methods for saving objects