Step 2: Save the file as an Excel file for future editing, adding more data, changing data, to preserve any formulas you were using, etc.

Similar documents
2. The Open dialog box appears and you select Text Files (*.prn,*.txt,*.csv) from the drop-down list in the lower right-hand corner.

How to Download Census Data from American Factfinder and Display it in ArcMap

Importing Data into R

FrontPage 2003: Forms

Mail Merge Creating Mailing Labels 3/23/2011

Teacher Activities Page Directions

Creating a Distribution List from an Excel Spreadsheet

How to deploy fonts using Configuration Manager 2012 R2

Instructions for Using Excel as a Grade Book

How To Use Optimum Control EDI Import. EDI Invoice Import. EDI Supplier Setup General Set up

Pulling a Random Sample from a MAXQDA Dataset

Creating a License File

Tutorial 2: Reading and Manipulating Files Jason Pienaar and Tom Miller

Novell ZENworks Asset Management 7.5

Client Marketing: Sets

Introduction to R Statistical Software

SAS Tips and Tricks. Disclaimer: I am not an expert in SAS. These are just a few tricks I have picked up along the way.

Importing and Exporting Databases in Oasis montaj

Pennsylvania Information Management System

EXCEL IMPORT user guide

Tutorial 2 Online and offline Ship Visualization tool Table of Contents

TABLE OF CONTENTS. Creating an Account Why Use enewsletters. Setting Up an enewsletter Account. Create/Send Logging In.

Using SPSS, Chapter 2: Descriptive Statistics

Getting Data From Your Practice Management System

March Module 3 Processing MOVES Output

WhatCounts Newsletter System Manual

Introduction to RStudio

Mail. Add or delete contacts. Chapter 3: Manage Contacts. Table of Contents

Instructions for applying data validation(s) to data fields in Microsoft Excel

PowerDMS SYNC Overview

Advanced Excel 10/20/2011 1

Help File. Version February, MetaDigger for PC

Address Registration. Administrator Guide

Creating a Network Graph with Gephi

To export data formatted for Avery labels -

User Guide for Online Permit Application & Emission Statement Submittals Using RADIUS 4.0

Welcome to the topic on the Import from Excel utility.

Quick Start Guide. Highly customizable automated trading Automate your trades according to rules and models you create.

Plan & Participant Reports Overview

UOFL SHAREPOINT ADMINISTRATORS GUIDE

Bulk Upload Tool (Beta) - Quick Start Guide 1. Facebook Ads. Bulk Upload Quick Start Guide

Introduction to R Statistical Software

Chapter 15: Forms. User Guide. 1 P a g e

Linking Telemet Orion to a Portfolio Accounting System

USING MS OUTLOOK WITH FUS

Fleet Manager II. Operator Manual

The s can be simple and text based, or graphic rich. They will look great whether being viewed on a computer or mobile device.

WAM Remote Wireless Asset Monitoring. Website User Guide

Work with the MiniBase App

Home Loan Manager Pro 7.1

Volume FIRST WALKTHROUGH. The 10-Minute Guide to Using Newsletter Services. First Walkthrough: the 10-Minute Guide

SPSS: Getting Started. For Windows

Mail Merge Using Thunderbird. Bob Booth February 2009 AP-Tbird2

MS Excel Template Building and Mapping for Neat 5

quick start guide A Quick Start Guide inflow Support GET STARTED WITH INFLOW

How to Mail Merge PDF Documents

Importing from Tab-Delimited Files

TRIM: Web Tool. Web Address The TRIM web tool can be accessed at:

User Manual V1.3. NCB File /alahlincb

Exporting from FirstClass

Chapter 4b - Navigating RedClick Import Wizard

Transitioning from TurningPoint 5 to TurningPoint Cloud - NO LMS 1

CHAPTER 7 PROCESSING SURVEY DATA

Fountas & Pinnell Benchmark Assessment System Data Management Software (DMS) User s Guide

MAIL MERGE TIPS FOR PC USERS

Creating an eportfolio using Blackboard 9.1

IFAS Reports. Participant s Manual. Version 1.0

USING OUTLOOK WITH ENTERGROUP. Microsoft Outlook

FY2016 Budget Collection. Software Instructions

Introduction to GIS software

Downloading Your Financial Statements to Excel

Free Excel add-in for linear regression and multivariate data analysis

Importing Contacts to Outlook

Chapter 10 Encryption Service

CentralMass DataCommon

Using the SAS Enterprise Guide (Version 4.2)

Teacher References archived classes and resources

Importing and Exporting With SPSS for Windows 17 TUT 117

Installation and Operation Manual Portable Device Manager, Windows version

Importing Transaction Files and Posting Them via Direct Mail Post

Microsoft Access Rollup Procedure for Microsoft Office Click on Blank Database and name it something appropriate.

HOW TO ADD COMPANIES TO RISK TRACKER

Prevue Online How-To Guide Managing a Branch Account

BulkSMS Text Messenger Product Manual

Xerox Standard Accounting Import/Export User Information Customer Tip

Project Zip Code. Version CUNA s Powerful Grassroots Program. User Manual. Copyright 2012, All Rights Reserved

FrontStream CRM Import Guide Page 2

Previewing & Publishing

ArcGIS Tutorial: Adding Attribute Data

R with Rcmdr: BASIC INSTRUCTIONS

SPSS for Simple Analysis

DATA VALIDATION and CONDITIONAL FORMATTING

Importing Data from a Dat or Text File into SPSS

Google Apps for Sharing Folders and Collecting Assignments

Vodafone Bulk Text. User Guide. Copyright Notice. Copyright Phonovation Ltd

Mail and Address Book Management

BMV-602 Data Link Manual

QUICK REFERENCE GUIDE

einstruction CPS (Clicker) Instructions

Autodesk Revit Keynotes Made Simple: Adding Custom Keynotes to Your Construction Documents Tony Crawford CAD-1, Inc.

Transcription:

R is a free statistical software environment that can run a wide variety of tests based on different downloadable packages and can produce a wide variety of simple to more complex graphs based on the data provided. R can seem daunting to use at first because it does not possess a user interface as friendly as many other software packages, but it more than makes up for it with its structured, easy-touse command structure and flexible environment. The first step with using a statistical program to solve a program is to enter the data for use in the program, and R is no different. There are many different ways to enter and revise data in R, but this tutorial will cover what CASE considers to be one of the easiest methods. This step-by-step process involves using Excel (or any other spreadsheet based program) and R. Importing Data into R Using Excel Step 1: Enter data into an Excel spreadsheet. Label each column with the name of the variable. Any character can be used, but do not use spaces in the name (ex. Blood Pressure should be BloodPressure or Blood_Pressure). If spaces are used an error message will appear when importing the data to R. (If you need additional support for entering data in spreadsheet formats, please see the CASE Introduction to Minitab tutorial listed under Minitab Tutorials for step-by-step directions.) Step 2: Save the file as an Excel file for future editing, adding more data, changing data, to preserve any formulas you were using, etc.

Step 3: Click/select Save As. For the Save as type: select the Text (Tab delimited) or CSV (Comma delimited) option from the dropdown menu depending on preference and capabilities of the computer. Name the file something that can be identified for future use. Before clicking Save, note the folder the files are being saved into. Then click Save. A notification window will appear. Click OK. Another notification window will appear with the alert that saving in this format may alter you data, click Yes. The Excel file is now saved as a.txt or.csv file that can be imported to R. If more changes need to be made to this file just repeat this process and save over the file or create a new.txt or.csv file. Excel file saved as separate document File name to identify Text document Selecting Text (Tab delimited) from the drop-down menu CSV (Comma delimited) is located here in Excel 2010

Step 4: Open R. The Windows version of R will open to the RGui program by default that allows access to the command-line tools used by R. For Linux or Mac be sure to open the correct GUI interface for your system. Step 5: To find the file just created select File, then select Change dir. Find the folder the file is saved to on the computer and click OK. Step 6: Enter the following code into R at the > symbol to import the data in R: For.txt file: bloodpressure<-read.table( BloodPressure.txt,header=TRUE) For.csv file: bloodpressure<-read.table( BloodPressure.csv,header=TRUE,sep=, ) Press Enter on the keyboard. If the file is imported correctly it should just appear with a new > symbol on the line below the code waiting for further instructions. The word bloodpressure above can be replaced with nearly any word or collection of letters, such as BP, Blood_pressure, or abc123, to identify the dataset being used. bloodpressure serves as an object to store the information so the computer can easily understand what the user wants. From this point on R recognizes that bloodpressure holds the table of data contained in the.txt or.csv file created from the Excel document. Step 7: To check the data to ensure it uploaded all cases, type bloodpressure at the > and the dataset should appear on the screen as it was entered into Excel. The following screenshot shows the data entry code from step 6 (for a.csv file) and checking the data in step 7:

At this point the data has been successfully uploaded and can now be used to run statistical tests, produce graphics, or complete any other task that code can be found for in R. Editing Minor Data Misentries/Mistakes in R R can edit the data set uploaded in the previous steps in a spreadsheet environment. This is useful for correcting small errors or adding a few cases. Any changes should also be made to the master Excel document created to originally store the data so that it remains consistent. If major changes need to be made, it may be worth going back into Excel and repeating the steps listed above to just import the updated data set. If the data set changes are minor R has a useful tool for easily updating the entries. Click Edit and then select Data editor. A window will appear that asks for Name of data frame or matrix. In the space provided enter the name of the object entered above, in the case of this example, bloodpressure. Click OK. The following screen appears:

Like in Excel, the numbers or column names can be changed by simply clicking on the cell and typing in the updated entry. Any changes made here will permanently affect the data as it is used in R, but will not change the.txt or.csv file used to import the data. Therefore, any changes made in R also need to be made to the master Excel document, otherwise the same data corrections will need to be made every time a new.txt or.csv file is created from the Excel document and imported into R. Once all changes have been made the window must be closed in order to continue using R. Exporting Data in R Back to.txt or.csv File If changes are made to your data, it is possible to update the file from inside R instead of having to open the file separately. To save your data to a.txt or.csv file from R use the following code: For.txt file: write.table(bloodpressure,file= BloodPressure.txt,sep= ) For.csv file: write.csv(bloodpressure,file= BloodPressure.csv ) where bloodpressure represents the name of the dataset you have in R. The file name should be something you can easily recognize with the dataset. If you are updating an already existing file, it should be the exact file name..txt files require the sep= from the code to identify that spaces are used as the separator of the different parts of data in the exported file. Closing R To save all data imported or entered into R as well ass any other variables that have been created from other commands click File then Save Workspace and name the file. To return to this data set and workspace simply open the file in the folder it was saved in. R should save all workspace information, so opening the file in R after closing the program should result in the same objects (such as bloodpressure representing the imported dataset) being the same. If you want to use the GUI to enter a command to save the image just use the following code: save.image(file= BloodPressureFile.RData ) where BloodPressureFile can be whatever name you wish to have in your folder for the R data.