Data Objects in R Vector1 dimensionAll elements have the same data types Data types: numeric, character logic, factor Matrix2 dimensions Array2 or more.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Introduction to R Brody Sandel. Topics Approaching your analysis Basic structure of R Basic programming Plotting Spatial data.
R for Macroecology Aarhus University, Spring 2011.
Training on R For 3 rd and 4 th Year Honours Students, Dept. of Statistics, RU Empowered by Higher Education Quality Enhancement Project (HEQEP) Department.
Refresh- Caitlin Collins, Thibaut Jombart MRC Centre for Outbreak Analysis and Modelling Imperial College London Genetic data analysis using
R tutorial g/methods2.2010/R-intro.pdf.
Data in R. General form of data ID numberSexWeightLengthDiseased… 112m … 256f3.61 NA1… 3……………… 4……………… n91m5.1711… NOTE: A DATASET IS NOT A MATRIX!
Basics of Using R Xiao He 1. AGENDA 1.What is R? 2.Basic operations 3.Different types of data objects 4.Importing data 5.Basic data manipulation 2.
Intro to R Stephanie Lee Dept of Sociology, CSSCR University of Washington September 2009.
Introduction to GTECH 201 Session 13. What is R? Statistics package A GNU project based on the S language Statistical environment Graphics package Programming.
Maths for Computer Graphics
R for Research Data Analysis using R Day1: Basic R Baburao Kamble University of Nebraska-Lincoln.
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
1 Statistics 517 Computing in Statistics © 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.
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.
Baburao Kamble (Ph.D) University of Nebraska-Lincoln Data Analysis Using R Week2: Data Structure, Types and Manipulation in R.
3. Functions and Arguments. Writing in R is like writing in English Jump three times forward Action Modifiers.
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.
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.
Arko Barman with modification by C.F. Eick COSC 4335 Data Mining Spring 2015.
Introduction to R Lecture 3: Data Manipulation Andrew Jaffe 9/27/10.
1 Basics. Exercise 2 - Answers Load e back to R workspace and check that it is there. load(file="pi.Rda") ls() 2.8 Remove all the objects you.
Session 3: More features of R and the Central Limit Theorem Class web site: Statistics for Microarray Data Analysis.
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.
Applied Bioinformatics Introduction to R, continued Bing Zhang Department of Biomedical Informatics Vanderbilt University
R: Packages & Data. Presented here are a number of ways to accomplish a task, some are redundant or may not represent the best way to accomplish a task.
Using the R software R is an open source comprehensive statistical package, more and more used around the world. R project web site:
R-Studio and Revolution Analytics have built additional functionality on top of base R.
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,
R Programming Yang, Yufei. Normal distribution.
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
R packages/libraries Data input/output Rachel Carroll Department of Public Health Sciences, MUSC Computing for Research I, Spring 2014.
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
Sha Tin Methodist College F.4 Computer Studies Pascal Programming.
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.
Learn R Toolkit D Kelly O'DayExcel & R WorldsMod 2 - Excel & R Worlds: 1 Module 2 Moving Between Excel & R Worlds Do See & HearRead Learning PowerPoint.
Introduction to Exploratory Descriptive Data Analysis in S-Plus Jagdish S. Gangolly State University of New York at Albany.
S-PLUS Lecture 4 Jaeyong Lee Pennsylvania State University.
Actor Heights 1)Create Vectors of Actor Names, Heights, Date of Birth, Gender 2) Combine the 4 Vectors into a DataFrame.
Lecture 11 Introduction to R and Accessing USGS Data from Web Services Jeffery S. Horsburgh Hydroinformatics Fall 2013 This work was funded by National.
Statistical Programming Using the R Language Lecture 1 Basic Concepts I Darren J. Fitzpatrick, Ph.D April 2016.
Introduction to R and Data Science Tools in the Microsoft Stack Jamey Johnston.
Data Management Data Types R basic 11/11/2013. Data Types 1. Vector 2. Factor 3. Matrix 4. Array 5. List 6. Dataframe.
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.
16BIT IITR Data Collection Module If you have not already done so, download and install R from download.
Vectors and DataFrames. Character Vector: b
Chapter 9: Data types and data structures OCR Computing for A Level © Hodder Education 2009.
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.
Statistical Programming Using the R Language
Linear Algebra review (optional)
Programming in R Intro, data and programming structures
Introduction to R Samal Dharmarathna.
DATA MANAGEMENT MODULE: Getting Data Into and Out of R
DATA MANAGEMENT MODULE: Getting Data Into and Out of R
CSCI N207 Data Analysis Using Spreadsheet
Statistics 540 Computing in Statistics
Vectors and DataFrames
Basics of R, Ch Functions Help Managing your Objects
CSCI N317 Computation for Scientific Applications Unit R
R Course 1st Lecture.
TransCAD Working with Matrices 2019/4/29.
Stat 251 (2009, Summer) Lab 2 TA: Yu, Chi Wai.
Creating a dataset in R Instructor: Li, Han
R tutorial
Presentation transcript:

Data Objects in R Vector1 dimensionAll elements have the same data types Data types: numeric, character logic, factor Matrix2 dimensions Array2 or more dimensions Data frame2 dimensionstable-like data object allowing different data types for different columns ListCollection of data objects, each element of a list is a data object

Manipulating Data Objects Creating c(), rep(), seq() numeric(),character(),factor(),logical() matrix(), array(), data.frame(), list() Saving Loading save(), load() (internal data file ) Importing Exporting read.table(), write.table() (external data file) Converting as.numeric(),as.character(),as.factor(),as.logical() as.matrix(), as.array(), as.data.frame(), as.list() Naming Indexing Selecting names(), clonames(), rownames() [ i ] (for vector), [ i, j] (for matrix and data frame), [ i, j, k, …] (for array), [ [ k ] ] (for list) j, k, can be integer or character or logical index Combining c(), paste(), cbind(), rbind(), merge() Sorting order() Misc. class(), length(), dim(), nrow(), ncol() ………

How to get help in R? Go to and read onlinehttp:// If you know the function name, type help(the name) in R, e.g. help(anova) If you just know the topic and don’t know the exact function name(s), type help.search(“the topic”) in R, e.g. help.search(“Fisher exact test”) Google it …

How to run R? Interactive mode (run code after entering R) Entering RWindows: click R icon MS-DOS: type R Linux: type R After entering Type and run code line by line Or type and paste and run multiple lines Or type source(“your code file”) Batch mode (run code without entering R) Only for MS-DOS or Linux Type R –no-save < your_code_file &