Introduction to R. Dataset Basics. March 2018

Size: px
Start display at page:

Download "Introduction to R. Dataset Basics. March 2018"

Transcription

1 Introduction to R March Preliminaries.... a) Suggested packages for importing/exporting data.... b) FAQ: How to find the path of your dataset (or whatever). 2. Import/Export Data a) R (.Rdata) b) Text file tab delimited (.txt).. c) Excel file (.csv)... d) Excel file (.xlsx).. e) Stata file (.dta) versions 13 and beyond..... f) Stata file (.dta) versions g) SAS (.sas7bdat).. h) SPSS file (.sav)... i) Minitab (.mtp) Create an R Data Frame from Scratch Describe Your Data Structure. 5. List Your Data \R handout 2018.docx Page 1 of 16

2 1. Preliminaries a. Suggested packages for importing/exporting data b. FAQ: How to find the path of your dataset (or whatever) a. Suggested Packages for Importing/Exporting Data To install a package (for example foreign), type in the console window (tip! don t forget the quotes) install.packages( foreign ) To attach a package to your R session (for example foreign), type in the console window (tip! NO quotes) library(foreign) Data Format Type Text Excel (.csv ) Excel (.xlsx ) Stata versions (.dta ) Stata versions ( dta ) SAS (.sas7bdat ) SPSS (.sav ) Minitab (.mtp ) Package Name (notes) No package installation required openxlsx openxlsx foreign haven haven haven foreign \R handout 2018.docx Page 2 of 16

3 b. FAQ: How to Find the Path of Your Dataset (or whatever) PC Users (Beware - R is fussy about the direction of slashes) 1. Navigate to the dataset or file for which you want to copy and paste the full path 2. Highlight to select the dataset or file 3. SHIFT + RIGHT click 4. Click COPY AS PATH 5. CONTROL v to paste (Important The full path will be displayed with LEFT slashes) 6. Important last step: In R session: a) change to RIGHT slashes; b) enclose in quotes MAC Users (Beware - R is fussy about the direction of slashes) 1. From APPLICATIONS > UTILITIES, launch TERMINAL 2. Navigate to the dataset or file for which you want to copy and paste the full path 3. HIGHLIGHT to select the dataset or file and drag this into terminal You should now see the full path. 4. HIGHLIGHT again 5. COMMAND c to copy 6. In R Session: COMMAND v to paste 7. Important last step: In R session: enclose in quotes Illustration: Command-c followed by Command-v will now produce: /Users/cbigelow/Desktop/framingham_1000.dta \R handout 2018.docx Page 3 of 16

4 2. Import/Export Data a. R (.Rdata) Package Required = none Load R Data Frame which comes with your R installation; no package to install here! Command is s are load ( ) load (file= filename.rdata ) Save R Data Frame Command is save( ) which comes with your R installation; no package to install here! save (object, file= filename.rdata ) \R handout 2018.docx Page 4 of 16

5 b. Text File tab delimited (.txt) Package Required = none Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import Text File Commands are read.table( ) and write.table( ) which come with your R installation; no package to install here! Your.txt file does NOT have headers object <- read.table( filename.txt, header=false) Option 2: Your.txt file DOES have headers object <- read.table( filename.txt, header=true) Export Text File Command is write.table( ) which comes with your R installation; no package to install here! Output a tab delimited text file, NO Headers write.table(object, file= filename.txt, sep= \ ) Option 2: Output a tab delimited text file, Headers write.table(object, file= filename.txt, col.names=true, sep= \ ) \R handout 2018.docx Page 5 of 16

6 c. Excel File (.csv) Package Required = none Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Preliminary Determine what separator is used in your.csv file (comma or semi-colon) Import Excel (.csv ) File The separator is a comma (,) and NO headers object <- read.table( filename.csv, header=false, sep=, ) Option 2: The separator is a semi-colon (;) and NO headers object <- read.table( filename.csv, header=false, sep= ; ) Export Excel (.csv ) File The separator is a comma (,) and NO headers write.table(object, file= filename.csv, header=false, sep=, ) Option 2: The separator is a semi-colon (;) and NO headers write.table(object, file= filename.csv, header=false, sep= ; ) Tip - For additional help (e.g working with strings, factors, headings, etc, visit \R handout 2018.docx Page 6 of 16

7 d. Excel File (.xlsx) Package Required = openxlsx install.packages( openxlsx ) library(openxlsx) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import Excel (.xlsx ) File Sheet=1, NO column headings object <- read.xlsx( filename.xlsx, sheet=1, colnames=false) Option 2: Sheet=1, Column headings object <- read.xlsx( filename.xlsx, sheet=1, colnames=true) Export Excel (.xlsx ) File NO column headings write.xlsx(object, file= filename.xlsx, colnames=false) Option 2: Column headings write.xlsx(object, file= filename.xlsx, colnames=true) \R handout 2018.docx Page 7 of 16

8 e. Stata File (.dta) versions 13 and beyond Package Required = haven install.packages( haven ) library(haven) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import Stata versions 13 and beyond (.dta ) File object <- read_dta( filename.dta ) Export Stata versions 13 and beyond (.dta ) File write_dta(object, filename.dta ) \R handout 2018.docx Page 8 of 16

9 f. Stata File (.dta) versions 5-12 Package Required = foreign install.packages( foreign ) library(foreign) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import Stata versions 5-12 (.dta ) File object <- read.dta( filename.dta ) Option 2: Asks R NOT to automatically convert categorical variables into factor variables: object <- read.dta( filename.dta, convert.factors=false) Export Stata to version 10 (.dta ) File write.dta(object, filename.dta,version=10) \R handout 2018.docx Page 9 of 16

10 g. SAS File (.sas7bdat) Package Required = haven install.packages( haven ) library(haven) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import SAS (.sas7bdat ) File object <- read_sas( filename.sas7bdat ) Export SAS (.sas7bdat ) File write_sas(object, filename.sas7bdat ) \R handout 2018.docx Page 10 of 16

11 h. SPSS File (.sav) Package Required = haven install.packages( haven ) library(haven) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import SPSS (.sav ) File object <- read_sav( filename.sav ) Export SPSS (.sav ) File write_sav(object, filename.sav ) \R handout 2018.docx Page 11 of 16

12 i. Minitab File (.mtp) Package Required = foreign install.packages( foreign ) library(foreign) Step 1 Save the data to be imported into R onto your desktop. Step 2 - Then set your working directory to be your desktop (appropriately edited, of course) in the console window: Import Minitab (.mtp ) File object <- read.mtp( filename.mtp ) Export Minitab (.mtp ) File Currently unavailable \R handout 2018.docx Page 12 of 16

13 3. Create an R Data Frame From Scratch Overview Step 1: Create each variable as a vector object in R. Step 2: Then bind together into a dataset object using the command data.frame( ) Example # Numeric variable = id id <- c(1,2,3,4) # Character variable = name name <- c('bob', 'Jean', 'Larry', 'Carol') # Date variable = dob dob <- as.date( c(' ',' ',' ',' ') ) # Numeric variable = weight weight <- c(175, 115, 150, 95) # Create data frame = mydata mydata <- data.frame(id,name,dob,weight) # Check str(mydata) 'data.frame': 4 obs. of 4 variables: $ id : num $ name : Factor w/ 4 levels "Bob","Carol",..: $ dob : Date, format: " " " "... $ weight: num list(mydata) [[1]] id name dob weight 1 1 Bob Jean Larry Carol \R handout 2018.docx Page 13 of 16

14 4. Describe Your Dataset Structure Preliminaries: To follow along, be sure to have downloaded larvae.dta install.packages( foreign ) library(foreign) larvae_dta <- read.dta( larvae.dta ) # Observations, # Variables Display variable names R Command colnames(larvae_data) Display number of rows (observations) nrow( ) nrow(larvae_data) [1] 15 Display number of columns (variables) ncol( ) Display dimensions of data set frame (rows x columns) (# observations x # variables) ncol(larvae_data) [1] 4 dim( ) dim(larvae_data) [1] 15 4 \R handout 2018.docx Page 14 of 16

15 Detailed Structure of Data command str(dataframe) # str(dataframe) str(larvae_data) 'data.frame': 15 obs. of 4 variables: $ id: num $ y : num $ x1: num $ x2: num attr(*, "datalabel")= chr "PubHlth 640 Unit 2 Regression - Larvae data" - attr(*, "time.stamp")= chr "10 Feb :36" - attr(*, "formats")= chr "%9.0g" "%9.0g" "%9.0g" "%9.0g" - attr(*, "types")= int attr(*, "val.labels")= chr "" "" "" "" - attr(*, "var.labels")= chr "larva id" "log10(survival)" "log10(dose)" "log10(weight)" - attr(*, "expansion.fields")=list of 2..$ : chr "_dta" "note1" "\"Week 3 homework assignment exercises 2 and 3\""..$ : chr "_dta" "note0" "1" - attr(*, "version")= int 12 \R handout 2018.docx Page 15 of 16

16 5. List Your Data Use Subscripts to Select a Subset of Your Data Just like spreadsheets in Excel or Stata data sets, rows are observations and variables are columns To select a subset of your data requires using subscripts, which can be thought of as addresses. Subscripts appear in square brackets and are of the form: dataframe[1 st subscript is for rows, 2 nd subscript is for columns] = [observation selection, variable selection] List First 6 observations using head( ) List Last 6 observations using tail( ) List Entire Data Set (be careful!): Two ways: 1) Just type its name; or 2) View(dataframe). List Selected Observations: For observations 8, 9, 10, list the data for all variables List Selected Variables: For all observations, List the observations for only the 2 nd variable List Selected Variables on Selected Observations: For observations 8, 9, 10 only, List the observations for only the 2 nd variable R Command head(larvae_data) tail(larvae_data) larvae_data View(larvae_data) larvae_data[8:10,] id y x1 x larvae_data[,2] [1] larvae_data[8:10,2] [1] \R handout 2018.docx Page 16 of 16

Introduction to R and R-Studio Getting Data Into R. 1. Enter Data Directly into R...

Introduction to R and R-Studio Getting Data Into R. 1. Enter Data Directly into R... Introduction to R and R-Studio 2017-18 02. Getting Data Into R 1. Enter Data Directly into R...... 2. Import Excel Data (.xlsx ) into R..... 3. Import Stata Data (.dta ) into R...... a) From a folder on

More information

Data Input/Output. Andrew Jaffe. January 4, 2016

Data Input/Output. Andrew Jaffe. January 4, 2016 Data Input/Output Andrew Jaffe January 4, 2016 Before we get Started: Working Directories R looks for files on your computer relative to the working directory It s always safer to set the working directory

More information

Stat 302 Statistical Software and Its Applications Data Import and Export

Stat 302 Statistical Software and Its Applications Data Import and Export 1 Stat 302 Statistical Software and Its Applications Data Import and Export Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 January 26, 2015 2 General Remarks on I/O

More information

Package rio. R topics documented: January 14, Type Package Title A Swiss-Army Knife for Data I/O Version 0.3.

Package rio. R topics documented: January 14, Type Package Title A Swiss-Army Knife for Data I/O Version 0.3. Type Package Title A Swiss-Army Knife for Data I/O Version 0.3.0 Date 2016-01-14 Package rio January 14, 2016 Maintainer Thomas J. Leeper Description Streamlined data import and

More information

Reading data into R. 1. Data in human readable form, which can be inspected with a text editor.

Reading data into R. 1. Data in human readable form, which can be inspected with a text editor. Reading data into R There is a famous, but apocryphal, story about Mrs Beeton, the 19th century cook and writer, which says that she began her recipe for rabbit stew with the instruction First catch your

More information

No Name What it does? 1 attach Attach your data frame to your working environment. 2 boxplot Creates a boxplot.

No Name What it does? 1 attach Attach your data frame to your working environment. 2 boxplot Creates a boxplot. No Name What it does? 1 attach Attach your data frame to your working environment. 2 boxplot Creates a boxplot. 3 confint A metafor package function that gives you the confidence intervals of effect sizes.

More information

Importing data sets in R

Importing data sets in R Importing data sets in R R can import and export different types of data sets including csv files text files excel files access database STATA data SPSS data shape files audio files image files and many

More information

https://biostatisticien.eu/springer/courserw3.pdf

https://biostatisticien.eu/springer/courserw3.pdf P. Lafaye de Micheaux 1 1 Mathematics and Statistics Departement Université de Montréal CANADA New South Wales University Sydney, Australia May 27, 2014 https://biostatisticien.eu/springer/courserw3.pdf

More information

Entering and Outputting Data 2 nd best TA ever: Steele H. Valenzuela February 2-6, 2015

Entering and Outputting Data 2 nd best TA ever: Steele H. Valenzuela February 2-6, 2015 Entering and Outputting Data 2 nd best TA ever: Steele H. Valenzuela February 2-6, 2015 Contents Things to Know Before You Begin.................................... 1 Entering and Outputting Data......................................

More information

Introduction to R and R-Studio Toy Program #2 Excel to R & Basic Descriptives

Introduction to R and R-Studio Toy Program #2 Excel to R & Basic Descriptives Introduction to R and R-Studio 2018-19 Toy Program #2 Basic Descriptives Summary The goal of this toy program is to give you a boiler for working with your own excel data. So, I m hoping you ll try!. In

More information

IMPORTING DATA IN R. Introduction read.csv

IMPORTING DATA IN R. Introduction read.csv IMPORTING DATA IN R Introduction read.csv Importing data in R? 5 types Flat files Data from Excel Databases Web Statistical software Flat Files states.csv Comma Separated Values state,capital,pop_mill,area_sqm

More information

Reading and wri+ng data

Reading and wri+ng data An introduc+on to Reading and wri+ng data Noémie Becker & Benedikt Holtmann Winter Semester 16/17 Course outline Day 4 Course outline Review Data types and structures Reading data How should data look

More information

BIOSTAT640 R Lab1 for Spring 2016

BIOSTAT640 R Lab1 for Spring 2016 BIOSTAT640 R Lab1 for Spring 2016 Minming Li & Steele H. Valenzuela Feb.1, 2016 This is the first R lab session of course BIOSTAT640 at UMass during the Spring 2016 semester. I, Minming (Matt) Li, am going

More information

BIOSTATS 640 Spring 2018 Introduction to R Data Description. 1. Start of Session. a. Preliminaries... b. Install Packages c. Attach Packages...

BIOSTATS 640 Spring 2018 Introduction to R Data Description. 1. Start of Session. a. Preliminaries... b. Install Packages c. Attach Packages... BIOSTATS 640 Spring 2018 Introduction to R and R-Studio Data Description Page 1. Start of Session. a. Preliminaries... b. Install Packages c. Attach Packages... 2. Load R Data.. a. Load R data frames...

More information

Data Input/Output. Introduction to R for Public Health Researchers

Data Input/Output. Introduction to R for Public Health Researchers Data Input/Output Introduction to R for Public Health Researchers Common new user mistakes we have seen 1. Working directory problems: trying to read files that R "can't find" RStudio can help, and so

More information

Lecture 1: Getting Started and Data Basics

Lecture 1: Getting Started and Data Basics Lecture 1: Getting Started and Data Basics The first lecture is intended to provide you the basics for running R. Outline: 1. An Introductory R Session 2. R as a Calculator 3. Import, export and manipulate

More information

Introduction to Statistics using R/Rstudio

Introduction to Statistics using R/Rstudio Introduction to Statistics using R/Rstudio R and Rstudio Getting Started Assume that R for Windows and Macs already installed on your laptop. (Instructions for installations sent) R on Windows R on MACs

More information

Intermediate Programming in R Session 1: Data. Olivia Lau, PhD

Intermediate Programming in R Session 1: Data. Olivia Lau, PhD Intermediate Programming in R Session 1: Data Olivia Lau, PhD Outline About Me About You Course Overview and Logistics R Data Types R Data Structures Importing Data Recoding Data 2 About Me Using and programming

More information

.txt - Exporting and Importing. Table of Contents

.txt - Exporting and Importing. Table of Contents .txt - Exporting and Importing Table of Contents Export... 2 Using Add Skip... 3 Delimiter... 3 Other Options... 4 Saving Templates of Options Chosen... 4 Editing Information in the lower Grid... 5 Import...

More information

Brief cheat sheet of major functions covered here. shoe<-c(8,7,8.5,6,10.5,11,7,6,12,10)

Brief cheat sheet of major functions covered here. shoe<-c(8,7,8.5,6,10.5,11,7,6,12,10) 1 Class 2. Handling data in R Creating, editing, reading, & exporting data frames; sorting, subsetting, combining Goals: (1) Creating matrices and dataframes: cbind and as.data.frame (2) Editing data:

More information

Where s the spreadsheet?

Where s the spreadsheet? Reading in Data Where s the spreadsheet? Statistical packages normally have a spreadsheet R has a minimal-but-usable spreadsheet More emphasis on data generated/curated externally Very powerful data import

More information

Introduction to Stata Getting Data into Stata. 1. Enter Data: Create a New Data Set in Stata...

Introduction to Stata Getting Data into Stata. 1. Enter Data: Create a New Data Set in Stata... Introduction to Stata 2016-17 02. Getting Data into Stata 1. Enter Data: Create a New Data Set in Stata.... 2. Enter Data: How to Import an Excel Data Set.... 3. Import a Stata Data Set Directly from the

More information

Introduction to R Commander

Introduction to R Commander Introduction to R Commander 1. Get R and Rcmdr to run 2. Familiarize yourself with Rcmdr 3. Look over Rcmdr metadata (Fox, 2005) 4. Start doing stats / plots with Rcmdr Tasks 1. Clear Workspace and History.

More information

Table of Contents. Navigate the Management Menu. 911 Management Page

Table of Contents. Navigate the Management Menu. 911 Management Page ucontrol Managing 911 Information Important note regarding 911 service: VoIP 911 service has certain limitations relative to Enhanced 911 service that is available on most traditional telephone service.

More information

POL 345: Quantitative Analysis and Politics

POL 345: Quantitative Analysis and Politics POL 345: Quantitative Analysis and Politics Precept Handout 1 Week 2 (Verzani Chapter 1: Sections 1.2.4 1.4.31) Remember to complete the entire handout and submit the precept questions to the Blackboard

More information

An Introduction to R- Programming

An Introduction to R- Programming An Introduction to R- Programming Hadeel Alkofide, Msc, PhD NOT a biostatistician or R expert just simply an R user Some slides were adapted from lectures by Angie Mae Rodday MSc, PhD at Tufts University

More information

Session 1 Nick Hathaway;

Session 1 Nick Hathaway; Session 1 Nick Hathaway; nicholas.hathaway@umassmed.edu Contents R Basics 1 Variables/objects.............................................. 1 Functions..................................................

More information

Introduction to R. base -> R win32.exe (this will change depending on the latest version)

Introduction to R. base -> R win32.exe (this will change depending on the latest version) Dr Raffaella Calabrese, Essex Business School 1. GETTING STARTED Introduction to R R is a powerful environment for statistical computing which runs on several platforms. R is available free of charge.

More information

Manual Physical Inventory Upload Created on 3/17/2017 7:37:00 AM

Manual Physical Inventory Upload Created on 3/17/2017 7:37:00 AM Created on 3/17/2017 7:37:00 AM Table of Contents... 1 Page ii Procedure After completing this topic, you will be able to manually upload physical inventory. Navigation: Microsoft Excel > New Workbook

More information

Regression III: Advanced Methods

Regression III: Advanced Methods Lecture 2: Software Introduction Regression III: Advanced Methods William G. Jacoby Department of Political Science Michigan State University jacoby@msu.edu Getting Started with R What is R? A tiny R session

More information

Goals of this course. Crash Course in R. Getting Started with R. What is R? What is R? Getting you setup to use R under Windows

Goals of this course. Crash Course in R. Getting Started with R. What is R? What is R? Getting you setup to use R under Windows Oxford Spring School, April 2013 Effective Presentation ti Monday morning lecture: Crash Course in R Robert Andersen Department of Sociology University of Toronto And Dave Armstrong Department of Political

More information

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here:

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here: Lab 1. Introduction to R & SAS R is free, open-source software. Get it here: http://tinyurl.com/yfet8mj for your own computer. 1.1. Using R like a calculator Open R and type these commands into the R Console

More information

A Manual for the Multivariate Permutation Test for Correlations

A Manual for the Multivariate Permutation Test for Correlations A Manual for the Multivariate Permutation Test for Correlations Jennifer Urbano Blackford, Geunyoung Kim, Niels Waller & Paul Yoder 1 Table of Contents 1 Introduction..... 1 2 Software Requirements...

More information

ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS

ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS Once you have downloaded a MODIS subset, there are a few steps you must take before you begin analyzing the data. Directions for

More information

Data Input/Output. Introduction to R for Public Health Researchers

Data Input/Output. Introduction to R for Public Health Researchers Data Input/Output Introduction to R for Public Health Researchers Common new user mistakes we have seen 1. Working directory problems: trying to read files that R can t find RStudio can help, and so do

More information

Module 4. Data Input. Andrew Jaffe Instructor

Module 4. Data Input. Andrew Jaffe Instructor Module 4 Data Input Andrew Jaffe Instructor Data Input We used several pre-installed sample datasets during previous modules (CO2, iris) However, 'reading in' data is the first step of any real project/analysis

More information

INTRODUCTION to. Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010

INTRODUCTION to. Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010 INTRODUCTION to Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010 While we are waiting Everyone who wishes to work along with the presentation should log onto

More information

Reading in data. Programming in R for Data Science Anders Stockmarr, Kasper Kristensen, Anders Nielsen

Reading in data. Programming in R for Data Science Anders Stockmarr, Kasper Kristensen, Anders Nielsen Reading in data Programming in R for Data Science Anders Stockmarr, Kasper Kristensen, Anders Nielsen Data Import R can import data many ways. Packages exists that handles import from software systems

More information

Exploring the Microsoft Access User Interface and Exploring Navicat and Sequel Pro, and refer to chapter 5 of The Data Journalist.

Exploring the Microsoft Access User Interface and Exploring Navicat and Sequel Pro, and refer to chapter 5 of The Data Journalist. Chapter 5 Exporting Data from Access and MySQL Skills you will learn: How to export data in text format from Microsoft Access, and from MySQL using Navicat and Sequel Pro. If you are unsure of the basics

More information

Input/Output Data Frames

Input/Output Data Frames Input/Output Data Frames Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Input/Output Importing text files Rectangular (n rows, c columns) Usually you want to use read.table read.table(file,

More information

Introduction to Stata Toy Program #1 Basic Descriptives

Introduction to Stata Toy Program #1 Basic Descriptives Introduction to Stata 2018-19 Toy Program #1 Basic Descriptives Summary The goal of this toy program is to get you in and out of a Stata session and, along the way, produce some descriptive statistics.

More information

Stat/Transfer 6.0. This program can be found on the delivered applications. Clicking on the program you get Figure 1.

Stat/Transfer 6.0. This program can be found on the delivered applications. Clicking on the program you get Figure 1. Stat/Transfer 6.0 This program can be found on the delivered applications. Clicking on the program you get Figure 1. Figure 1: Stat/Transfer initial window You are asked to supply the Input File Type.

More information

Introduction to R. UCLA Statistical Consulting Center R Bootcamp. Irina Kukuyeva September 20, 2010

Introduction to R. UCLA Statistical Consulting Center R Bootcamp. Irina Kukuyeva September 20, 2010 UCLA Statistical Consulting Center R Bootcamp Irina Kukuyeva ikukuyeva@stat.ucla.edu September 20, 2010 Outline 1 Introduction 2 Preliminaries 3 Working with Vectors and Matrices 4 Data Sets in R 5 Overview

More information

SAS Viya 3.2: Self-Service Import

SAS Viya 3.2: Self-Service Import SAS Viya 3.2: Self-Service Import About Self-Service Import Overview of Self-Service Import Self-service import offers an easy way to bring data into the SAS Cloud Analytic Services (CAS) environment.

More information

Exporting your Address Book from Despatch Manager Online & importing it into Click & Drop

Exporting your Address Book from Despatch Manager Online & importing it into Click & Drop Exporting your Address Book from Despatch Manager Online & importing it into Click & Drop How to export your Address Book from Despatch Manager Online (DMO) The process to export your Address Book from

More information

Creating consistent content pages

Creating consistent content pages Creating consistent content pages Content pages link from the electronic portfolio s home page. Using the ideas from the class discussion, determine the consistent elements of your content pages and plan

More information

17 - VARIABLES... 1 DOCUMENT AND CODE VARIABLES IN MAXQDA Document Variables Code Variables... 1

17 - VARIABLES... 1 DOCUMENT AND CODE VARIABLES IN MAXQDA Document Variables Code Variables... 1 17 - Variables Contents 17 - VARIABLES... 1 DOCUMENT AND CODE VARIABLES IN MAXQDA... 1 Document Variables... 1 Code Variables... 1 The List of document variables and the List of code variables... 1 Managing

More information

A Short Guide to R with RStudio

A Short Guide to R with RStudio Short Guides to Microeconometrics Fall 2013 Prof. Dr. Kurt Schmidheiny Universität Basel A Short Guide to R with RStudio 2 1 Introduction A Short Guide to R with RStudio 1 Introduction 3 2 Installing R

More information

University of North Dakota PeopleSoft Finance Tip Sheets. Utilizing the Query Download Feature

University of North Dakota PeopleSoft Finance Tip Sheets. Utilizing the Query Download Feature There is a custom feature available in Query Viewer that allows files to be created from queries and copied to a user s PC. This feature doesn t have the same size limitations as running a query to HTML

More information

STAT 113: R/RStudio Intro

STAT 113: R/RStudio Intro STAT 113: R/RStudio Intro Colin Reimer Dawson Last Revised September 1, 2017 1 Starting R/RStudio There are two ways you can run the software we will be using for labs, R and RStudio. Option 1 is to log

More information

SPREADSHEETS. (Data for this tutorial at

SPREADSHEETS. (Data for this tutorial at SPREADSHEETS (Data for this tutorial at www.peteraldhous.com/data) Spreadsheets are great tools for sorting, filtering and running calculations on tables of data. Journalists who know the basics can interview

More information

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata..

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata.. Introduction to Stata 2016-17 01. First Session I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3.

More information

GOOGLE SHEETS TUTORIAL

GOOGLE SHEETS TUTORIAL GOOGLE SHEETS TUTORIAL STM TRAINING PROGRAM BY BREANA NARINE (Instructional Design Assistant) Google Sheets Tutorial Google Sheet is an online service provided by Google where you are able to create new

More information

Import and Export Explorer Queries

Import and Export Explorer Queries App Number: 010060 Import and Export Explorer Queries Last Updated 22 nd March 2013 Powered by: AppsForGreentree.com 2013 1 Table of Contents Features... 3 Uses... 3 Options... 3 Important Notes... 3 Other

More information

STAT 571A Advanced Statistical Regression Analysis. Introduction to R NOTES

STAT 571A Advanced Statistical Regression Analysis. Introduction to R NOTES STAT 571A Advanced Statistical Regression Analysis Introduction to R NOTES 2015 University of Arizona Statistics GIDP. All rights reserved, except where previous rights exist. No part of this material

More information

Introduction to R. 1 Introduction 2. 2 What You Need 2

Introduction to R. 1 Introduction 2. 2 What You Need 2 Introduction to R Dave Armstrong University of Wisconsin-Milwaukee Department of Political Science e: armstrod@uwm.edu w: http://www.quantoid.net/teachuw/uwmpsych Contents 1 Introduction 2 2 What You Need

More information

EXCEL IMPORT user guide

EXCEL IMPORT user guide 18.2 user guide No Magic, Inc. 2015 All material contained herein is considered proprietary information owned by No Magic, Inc. and is not to be shared, copied, or reproduced by any means. All information

More information

Microsoft Windows Software Manual for FITstep Stream Version 3

Microsoft Windows Software Manual for FITstep Stream Version 3 Thank you for purchasing this product from Gopher. If you are not satisfied with any Gopher purchase for any reason at any time, contact us and we will replace the product, credit your account, or refund

More information

Module 1: Introduction RStudio

Module 1: Introduction RStudio Module 1: Introduction RStudio Contents Page(s) Installing R and RStudio Software for Social Network Analysis 1-2 Introduction to R Language/ Syntax 3 Welcome to RStudio 4-14 A. The 4 Panes 5 B. Calculator

More information

Mélanie Weynants and Brigitta Tóth November 20, 2014

Mélanie Weynants and Brigitta Tóth November 20, 2014 The euptf package Mélanie Weynants and Brigitta Tóth mweynants@gmail.com November 20, 2014 The euptf package provides pedotransfer functions (PTFs) for the prediction of hydraulic properties in European

More information

Identifying Updated Metadata and Images from a Content Provider

Identifying Updated Metadata and Images from a Content Provider University of Iowa Libraries Staff Publications 4-8-2010 Identifying Updated Metadata and Images from a Content Provider Wendy Robertson University of Iowa 2010 Wendy C Robertson Comments Includes presenter's

More information

Outline. What are SAS (1966), Stata (1985), and SPSS (1968)? Migrating to R for SAS/SPSS/Stata Users

Outline. What are SAS (1966), Stata (1985), and SPSS (1968)? Migrating to R for SAS/SPSS/Stata Users UCLA Department of Statistics Statistical Consulting Center Outline Vivian Lew vlew@stat.ucla.edu October 4, 2009 Statistical packages allow you to read raw data and transform it into a proprietary file

More information

Importing in Offertory Donations from Spreadsheets into Connect Now

Importing in Offertory Donations from Spreadsheets into Connect Now Importing in Offertory Donations from Spreadsheets into Connect Now When you have an excel spreadsheet that has donations in it, if you have a key identifier, such as an envelope number, then the spreadsheet

More information

File Input/Output in Python. October 9, 2017

File Input/Output in Python. October 9, 2017 File Input/Output in Python October 9, 2017 Moving beyond simple analysis Use real data Most of you will have datasets that you want to do some analysis with (from simple statistics on few hundred sample

More information

R syntax guide. Richard Gonzalez Psychology 613. August 27, 2015

R syntax guide. Richard Gonzalez Psychology 613. August 27, 2015 R syntax guide Richard Gonzalez Psychology 613 August 27, 2015 This handout will help you get started with R syntax. There are obviously many details that I cannot cover in these short notes but these

More information

Making sense of census microdata

Making sense of census microdata Making sense of census microdata Tutorial 3: Creating aggregated variables and visualisations First, open a new script in R studio and save it in your working directory, so you will be able to access this

More information

Computer lab 2 Course: Introduction to R for Biologists

Computer lab 2 Course: Introduction to R for Biologists Computer lab 2 Course: Introduction to R for Biologists April 23, 2012 1 Scripting As you have seen, you often want to run a sequence of commands several times, perhaps with small changes. An efficient

More information

CSV Roll Documentation

CSV Roll Documentation CSV Roll Documentation Version 1.1 March 2015 INTRODUCTION The CSV Roll is designed to display the contents of a Microsoft Excel worksheet in a Breeze playlist. The Excel worksheet must be exported as

More information

An Introduction to Stata Part I: Data Management

An Introduction to Stata Part I: Data Management An Introduction to Stata Part I: Data Management Kerry L. Papps 1. Overview These two classes aim to give you the necessary skills to get started using Stata for empirical research. The first class will

More information

Reference Guide. Adding a Generic File Store - Importing From a Local or Network ShipWorks Page 1 of 21

Reference Guide. Adding a Generic File Store - Importing From a Local or Network ShipWorks Page 1 of 21 Reference Guide Adding a Generic File Store - Importing From a Local or Network Folder Page 1 of 21 Adding a Generic File Store TABLE OF CONTENTS Background First Things First The Process Creating the

More information

R: A Gentle Introduction. Vega Bharadwaj George Mason University Data Services

R: A Gentle Introduction. Vega Bharadwaj George Mason University Data Services R: A Gentle Introduction Vega Bharadwaj George Mason University Data Services Part I: Why R? What do YOU know about R and why do you want to learn it? Reasons to use R Free and open-source User-created

More information

Preparing IBM SPSS Data and MS Excel Files for Conducting Mplus Analyses. Lynn N. Tabata

Preparing IBM SPSS Data and MS Excel Files for Conducting Mplus Analyses. Lynn N. Tabata Ronald H. Heck 1 Preparing IBM SPSS Data and MS Excel Files for Conducting Mplus Analyses Lynn N. Tabata IBM SPSS and Excel data files (.sav and.xls) may be exported to one of several file formats that

More information

Microsoft Windows Software Manual for FITstep Pro Version 3

Microsoft Windows Software Manual for FITstep Pro Version 3 Thank you for purchasing this product from Gopher. If you are not satisfied with any Gopher purchase for any reason at any time, contact us and we will replace the product, credit your account, or refund

More information

R Command Summary. Steve Ambler Département des sciences économiques École des sciences de la gestion. April 2018

R Command Summary. Steve Ambler Département des sciences économiques École des sciences de la gestion. April 2018 R Command Summary Steve Ambler Département des sciences économiques École des sciences de la gestion Université du Québec à Montréal c 2018 : Steve Ambler April 2018 This document describes some of the

More information

3/31/2016. Spreadsheets. Spreadsheets. Spreadsheets and Data Management. Unit 3. Can be used to automatically

3/31/2016. Spreadsheets. Spreadsheets. Spreadsheets and Data Management. Unit 3. Can be used to automatically MICROSOFT EXCEL and Data Management Unit 3 Thursday March 31, 2016 Allow users to perform simple and complex sorting Allow users to perform calculations quickly Organizes and presents figures that can

More information

HOW TO USE THE EXPORT FEATURE IN LCL

HOW TO USE THE EXPORT FEATURE IN LCL HOW TO USE THE EXPORT FEATURE IN LCL In LCL go to the Go To menu and select Export. Select the items that you would like to have exported to the file. To select them you will click the item in the left

More information

Loading Data into R. Loading Data Sets

Loading Data into R. Loading Data Sets Loading Data into R Loading Data Sets Rather than manually entering data using c() or something else, we ll want to load data in stored in a data file. For this class, these will usually be one of three

More information

Child Care Initiative Project (CCIP)

Child Care Initiative Project (CCIP) Child Care Initiative Project (CCIP) CCIP Database Export Instructions: Professional Development Profile Data Direct Service Form & Direct Service Short Form These instructions will help you to export

More information

1. Open the New American FactFinder using this link:

1. Open the New American FactFinder using this link: Exercises for Mapping and Using US Census Data MIT GIS Services, IAP 2012 More information, including a comparison of tools available through the MIT Libraries, can be found at: http://libraries.mit.edu/guides/types/census/tools-overview.html

More information

å To access Advanced List Edit: Advanced List Edit

å To access Advanced List Edit: Advanced List Edit Advanced List Edit This utility is used to import/export lists and to perform various editing functions on AIQ list files. You can open multiple lists and drag/drop or cut/paste between the lists. You

More information

QUICKBOOKS TO ACCOUNTEDGE CONVERSION GUIDE

QUICKBOOKS TO ACCOUNTEDGE CONVERSION GUIDE QUICKBOOKS TO ACCOUNTEDGE CONVERSION GUIDE Our goal is to save you as much time as possible while you transition your business accounting software. While accounting is accounting, AccountEdge takes a very

More information

EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression

EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression OBJECTIVES 1. Prepare a scatter plot of the dependent variable on the independent variable 2. Do a simple linear regression

More information

MBV4410/9410 Fall Bioinformatics for Molecular Biology. Introduction to R

MBV4410/9410 Fall Bioinformatics for Molecular Biology. Introduction to R MBV4410/9410 Fall 2018 Bioinformatics for Molecular Biology Introduction to R Outline Introduce R Basic operations RStudio Bioconductor? Goal of the lecture Introduce you to R Show how to run R, basic

More information

1. Creating a data set using the data editor 2. Importing an Excel data file

1. Creating a data set using the data editor 2. Importing an Excel data file Introduction This illustration describes two ways to enter data into Stata 1. Creating a data set using the data editor 2. Importing an Excel data file Example -. This data set has n=4 observations on

More information

2. Click File and then select Import from the menu above the toolbar. 3. From the Import window click the Create File to Import button:

2. Click File and then select Import from the menu above the toolbar. 3. From the Import window click the Create File to Import button: Totality 4 Import How to Import data into Totality 4. Totality 4 will allow you to import data from an Excel spreadsheet or CSV (comma separated values). You must have Microsoft Excel installed in order

More information

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment. Beginning Access 2007 Objective 1: Familiarize yourself with basic database terms and definitions. What is a Database? A Database is simply defined as a collection of related groups of information. Things

More information

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables Jennie Murack You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables How to conduct basic descriptive statistics

More information

Excel Tips and Tricks

Excel Tips and Tricks Excel Tips and Tricks References Excel Annoyances - Curtis Frye Excel Hacks - O Reilly http://www.exceltip.com (Joseph Rubin) http://exceltips.vitalnews.com/ (Allen Wyatt) Some Excel Basics as well as

More information

Introduction to R and R-Studio Toy Program #1 R Essentials. This illustration Assumes that You Have Installed R and R-Studio

Introduction to R and R-Studio Toy Program #1 R Essentials. This illustration Assumes that You Have Installed R and R-Studio Introduction to R and R-Studio 2018-19 Toy Program #1 R Essentials This illustration Assumes that You Have Installed R and R-Studio If you have not already installed R and RStudio, please see: Windows

More information

A whirlwind introduction to using R for your research

A whirlwind introduction to using R for your research A whirlwind introduction to using R for your research Jeremy Chacón 1 Outline 1. Why use R? 2. The R-Studio work environment 3. The mock experimental analysis: 1. Writing and running code 2. Getting data

More information

Outline. Mixed models in R using the lme4 package Part 1: Introduction to R. Following the operations on the slides

Outline. Mixed models in R using the lme4 package Part 1: Introduction to R. Following the operations on the slides Outline Mixed models in R using the lme4 package Part 1: Introduction to R Douglas Bates University of Wisconsin - Madison and R Development Core Team UseR!2009, Rennes, France

More information

Importing Career Standards Benchmark Scores

Importing Career Standards Benchmark Scores Importing Career Standards Benchmark Scores The Career Standards Benchmark assessments that are reported on the PIMS Student Fact Template for Career Standards Benchmarks can be imported en masse using

More information

Basics of R. > x=2 (or x<-2) > y=x+3 (or y<-x+3)

Basics of R. > x=2 (or x<-2) > y=x+3 (or y<-x+3) Basics of R 1. Arithmetic Operators > 2+2 > sqrt(2) # (2) >2^2 > sin(pi) # sin(π) >(1-2)*3 > exp(1) # e 1 >1-2*3 > log(10) # This is a short form of the full command, log(10, base=e). (Note) For log 10

More information

32 Using Local Data Sources in Web Intelligence Documents

32 Using Local Data Sources in Web Intelligence Documents 32 Using Local Data Sources in Web Intelligence Documents We have used universes as data sources for queries created in Web Intelligence and in Web Intelligence Rich Client. 32.1 Local Data Sources in

More information

R in Linguistic Analysis. Week 2 Wassink Autumn 2012

R in Linguistic Analysis. Week 2 Wassink Autumn 2012 R in Linguistic Analysis Week 2 Wassink Autumn 2012 Today R fundamentals The anatomy of an R help file but first... How did you go about learning the R functions in the reading? More help learning functions

More information

Topic 4D: Import and Export Contacts

Topic 4D: Import and Export Contacts Topic 4D: Import and Export Contacts If a corporation merges with another corporation it may become necessary to add the contacts to the new merged companies contact folder. This can be done by Importing

More information

Introduction to R and R-Studio In-Class Lab Activity The 1970 Draft Lottery

Introduction to R and R-Studio In-Class Lab Activity The 1970 Draft Lottery Introduction to R and R-Studio 2018-19 In-Class Lab Activity The 1970 Draft Lottery Summary The goal of this activity is to give you practice with R Markdown for saving your work. It s also a fun bit of

More information

Introduction to R. Andy Grogan-Kaylor October 22, Contents

Introduction to R. Andy Grogan-Kaylor October 22, Contents Introduction to R Andy Grogan-Kaylor October 22, 2018 Contents 1 Background 2 2 Introduction 2 3 Base R and Libraries 3 4 Working Directory 3 5 Writing R Code or Script 4 6 Graphical User Interface 4 7

More information

TopView SQL Configuration

TopView SQL Configuration TopView SQL Configuration Copyright 2013 EXELE Information Systems, Inc. EXELE Information Systems (585) 385-9740 Web: http://www.exele.com Support: support@exele.com Sales: sales@exele.com Table of Contents

More information

Adding Users. Adding Users CHAPTER

Adding Users. Adding Users CHAPTER CHAPTER 15 You can use Cisco Unified Communications Manager Bulk Administration (BAT) to add a group of new users and to associate users to phones and other IP Telephony devices in the Cisco Unified Communications

More information