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.

Slides:



Advertisements
Similar presentations
Understanding Relational Databases Basic Concepts and Applications for Qualitative Content Analysis.
Advertisements

The SAS ® System Additional Information on Statistical Analysis Programming.
Kuali Budget Construction Training Catherine Maddaford KBC Administrator.
Importing Test Scores (including the use of Excel’s VLOOKUP function) Chris A. McManigal Camden County Schools Kingsland, GA.
How to Import Names into GradeCam By Monica Dixon.
Creating New Financial Statements In Excel Presented by: Nancy Ross.
RETRIEVING DATA FROM FCC LICENSE DATABASE Steps for obtaining query results, and importing it into MS Excel Spreadsheet.
Introduction to GTECH 201 Session 13. What is R? Statistics package A GNU project based on the S language Statistical environment Graphics package Programming.
Access Tutorial 1 Creating a Database
2015/6/301 TransCAD Managing Data Tables. 2015/6/302 Create a New Table.
SPSS 1: An Introduction to the Statistical Package SPSS Suzie Cro MRC Clinical Trials Unit.
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
Pasewark & Pasewark 1 Access Lesson 6 Integrating Access Microsoft Office 2007: Introductory.
1 Access Lesson 6 Integrating Access Microsoft Office 2010 Introductory Pasewark & Pasewark.
Separating Columns in Excel. An extremely useful function in Excel is the Text to Column feature which can be used for any type of column separation but.
Little Linear Algebra Contents: Linear vector spaces Matrices Special Matrices Matrix & vector Norms.
Programming in R Packages, functions, and apply. Functions, Packages, and apply() In this session, we will learn –What are functions. –A brief introduction.
Importing existing reference lists Lorraine Beard & Martin Snelling DRAFT: May 2007.
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.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
Lesson 2 Topic - Reading in data Chapter 2 (Little SAS Book)
Lesson 1: Exploring Access Learning Objectives After studying this lesson, you will be able to: Start Access and identify elements of the application.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
Feedback ELearning in Sakai. Feedback UseExport GradebookWorking in ExcelPost FileView FeedbackUpdate, Download, or Delete.
Common Application Software. MS Word Some advanced use : Mail-merge Self-made Templates Macro (recording and running)
R packages/libraries Data input/output Rachel Carroll Department of Public Health Sciences, MUSC Computing for Research I, Spring 2014.
CREATING A LABEL MAIL MERGE IN WORD. TERMS FIELDS RECORDS MERGE CODES.
Excel 2010 Formatting Columns and Rows Excel 2010 / Mr. Bitenas In this lesson you will learn how to insert, delete, and resize Columns and Rows.
Python Mini-Course University of Oklahoma Department of Psychology Lesson 18 Using text files to share data with other programs 5/07/09 Python Mini-Course:
12 steps for Mail Merge Setup Mpact Magic. Step 1 Open Your MS Outlook program and put it an offline mode. Go to Main Menu >> File >> Work Offline.
MySQL Importing and creating a database. CSV (Comma Separated Values) file CSV = Comma Separated Values – they are simple text files containing data which.
Planning & Creating a Database By Ms. Naira Microsoft Access.
With Microsoft Excel 2007Comprehensive 1e© 2008 Pearson Prentice Hall1 Chapter 4: PowerPoint Presentation GO! with Microsoft Excel ® 2007 Comprehensive.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Importing Data to Excel. Suppose you have a delimited* text file and you need to bring it into Excel. Follow these steps… *Delimited means text separated.
Use SPSS for solving the problems Lecture#21. Opening SPSS The default window will have the data editor There are two sheets in the window: 1. Data view2.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
Lesson 17 Mail Merge. Overview Create a main document. Create a data source. Insert merge fields into a main document. Perform a mail merge. Use data.
Working with data in R 2 Fish 552: Lecture 3. Recommended Reading An Introduction to R (R Development Core Team) –
Scroll down to see more Enter names of scoring criteria.
Survey Training Pack Session 14 – Transferring CSPro, Access and Excel Files to SPSS.
Introduction to the SPSS Interface
Making a JSON file.
Learning How to “Excel”
Student Registration/ Personal Needs Profile
Access Tutorial 1 Creating a Database
DATA MANAGEMENT MODULE: Getting Data Into and Out of R
Prepare data for importing
By Shivgan Joshi Qcfinance.in
Accsess 2013 Creating Database.
Contract Compliance: Search
Access Lesson 14 Import and Export Data
Uploading and handling databases
DATA MANAGEMENT MODULE: Getting Data Into and Out of R
Access Tutorial 1 Creating a Database
Advanced Data Import & Export Jeff Henrikson
Reading a CSV file in R.
Learning about Taxes with Intuit ProFile
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Spss 11.5 Tutorial.
Learning about Taxes with Intuit ProFile
Lessons Vocabulary Access 2016.
funCTIONs and Data Import/Export
Basics of R, Ch Functions Help Managing your Objects
Student Registration/ Personal Needs Profile
Access Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
Student Registration/ Personal Needs Profile
Introduction to the SPSS Interface
Presentation transcript:

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 to use commands to read data from CSV files, tab delimited files, and fixed field files.

R Data type Vectors – a single column (or row )of data –Example – a numeric vector containing test scores of students Matrix – a collection of vectors but must all be of the same data type Data frame – a special matrix that can contain both numeric and character columns.

R commands c() – creates a column vector print – prints the contents of an object read.csv – reads in a CSV file read.table – more generic function that can read in files with any delimiter, such as tab delimited. read.fwf – reads in fixed record formats.

Creating Data in R The easiest way to add data to R is to code it. names <- c("Bob","Gene","Valerie") print(names) age <- c(30, 40, 19) hometown <- c("Dallas, TX", "Little Rock, AR", "Dayton, OH") print(hometown)

Importing Data Into R In order to import data into R, we need to know how the file was created. –Excel file –SAS –SPSS –Delimited –Fixed-field or fixed record.

Importing Data Into R Base R cannot import data directly from Excel. –There are packages available that allow R to import directly from Excel. –We will learn about packages in the next session.

Importing Excel Need to save Excel as a CSV file. –Click File/Save As –On the next GUI, select CSV from the Save as type. –We will demonstrate it in a few minutes.

CSV File

Importing CSV file #~~~~~~~~~~~~~~~~~~~~~~~~# # code chunk 2 # # Import CSV File # #~~~~~~~~~~~~~~~~~~~~~~~~# widge <- read.csv("C:\\Path here\\WidgeOne.csv") head(widge)