RStudio tips. Menu bar. How to get familiar with RStudio quickly

Similar documents
Microsoft Word 2011: Create a Table of Contents

Creating tables of contents and figures in Word 2013

MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

WINDOWS 7 EXPLORE INTERNET EXPLORER 8

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Introduction to Word 2007

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Browsing and working with your files and folder is easy with Windows 7 s new look Windows Explorer.

Creating a Web Site with Publisher 2010

How to create pop-up menus

Contents. Launching FrontPage Working with the FrontPage Interface... 3 View Options... 4 The Folders List... 5 The Page View Frame...

Introduction to Final Cut Pro 7 - Editing Basics

Basics. a. Click the arrow to the right of the Options button, and then click Bcc.

Microsoft Word 2011 Basics for Mac

Chapter 4: Website Basics

Outlook Express. a ZOOMERS guide

WINDOWS 7 MANAGE FILES AND FOLDER WITH WINDOWS EXPLORER

Microsoft PowerPoint Exercises 4

1.5 MONITOR. Schools Accountancy Team INTRODUCTION

For Introduction to Java Programming, 5E By Y. Daniel Liang

Creating Online Surveys with Qualtrics Survey Tool

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

Microsoft PowerPoint 2010 Handout

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Umbraco v4 Editors Manual

Text Basics. Introduction

Creating trouble-free numbering in Microsoft Word

Microsoft Windows Overview Desktop Parts

Microsoft Word 2013 Tutorial

PureEdge Viewer Training Guide

Create a Simple Website. Intel Easy Steps Intel Corporation All rights reserved.

OUTLOOK WEB APP (OWA): MAIL

PowerPoint 2013: Basic Skills

Introduction. POP and IMAP Servers. MAC1028 June 2007

Advanced Event Viewer Manual

INTRODUCTION TO DESKTOP PUBLISHING

Creating Personal Web Sites Using SharePoint Designer 2007

BACKUP MICROSOFT OUTLOOK/OUTLOOK EXPRESS

You must have at least Editor access to your own mail database to run archiving.

Handout: Word 2010 Tips and Shortcuts

Macros in Word & Excel

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

Basic Computer Skills for Beginners. Mesa Regional Family History Center

Getting Started Guide

CATIA Basic Concepts TABLE OF CONTENTS

Microsoft Outlook 2003 Quick How-to Guide

Microsoft Office Excel 2007 Key Features. Office of Enterprise Development and Support Applications Support Group

This Skill Builder demonstrates how to define and place sketched symbols in drawings.

Microsoft Word 2010 Tutorial

Creating Your Personal Website

DATASTREAM CHARTING ADVANCED FEATURES

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

Business Insight Report Authoring Getting Started Guide

Training Manual. Version 6

ZIMBRA LAYOUT. Keyboard Shortcuts Hitting G and the beginning letter of any of the tabs will instantly take you to that tab

Configure Single Sign on Between Domino and WPS

Mastering the JangoMail EditLive HTML Editor

Using the free iweb webpage templates

Merging Labels, Letters, and Envelopes Word 2013

Basic Introduction. GMFX MetaTrader 4.0. Basic Introduction

Microsoft PowerPoint 2011

Business Intelligence Office of Planning Planning and Statistics Portal Overview

Archiving GroupWise 12 Mail

3 IDE (Integrated Development Environment)

TxDMV RTS Training Guide for Working with Cognos Reports

Appendix A How to create a data-sharing lab

Copyright 2006 TechSmith Corporation. All Rights Reserved.

Using Microsoft Word. Working With Objects

To Begin Customize Office

How to FTP (How to upload files on a web-server)

Microsoft PowerPoint 2007

Bitrix Site Manager 4.1. User Guide

Windows XP Pro: Basics 1

Working with the new enudge responsive styles

Advanced Presentation Features and Animation

How to access your via Outlook Web Access

Outlook . User Guide IS TRAINING CENTER. 833 Chestnut St, Suite 600. Philadelphia, PA

OUTLOOK 2010 TIPS TABLE OF CONTENTS 1. SEND A BLIND CARBON COPY MARQUETTE UNIVERSITY IT SERVICES

Introduction to Microsoft PowerPoint

Importing Contacts to Outlook

Using Microsoft Office XP Advanced Word Handout INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 1.

Microsoft Excel Introduction to Microsoft Excel 2007

Creating a table of contents quickly in Word

Wakanda Studio Features

Making a Web Page with Microsoft Publisher 2003

Inside Blackboard Collaborate for Moderators

TABLE OF CONTENTS I. MAIL MERGING...1 II. MAIL MERGE WIZARD...1 III. MAIL MERGE TOOLBAR...4 PRINTING LABELS AND ENVELOPES...4

Lotus Notes Client Version 8.5 Reference Guide

Microsoft Word Quick Reference Guide. Union Institute & University

I ntroduction. Accessing Microsoft PowerPoint. Anatomy of a PowerPoint Window

Guide to PDF Publishing

Laptop Backup - User Guide (Windows)

Microsoft Publisher 2010 What s New!

WebEx Sharing Resources

Microsoft Access 2010 handout

2) Sharing Projects Made easy by IntelliGantt s Share Wizard, there are three share options to fit the needs of your project.

at Bradford - Outlook

Introduction to OpenOffice Writer 2.0 Jessica Kubik Information Technology Lab School of Information University of Texas at Austin Fall 2005

Windows 8.1 Update 1 Supplement

SiteBuilder 2.1 Manual

Transcription:

How to get familiar with RStudio quickly Menu bar The Menu bar is composed of several tools to manage R session, code editing, project settings, and package development. Most of the utilities that sit in the Menu bar can be found in RStudio panels, or using keyboard shortcuts. RSTUDIO TIPS 1

General options From the Menu bar you can access the Genral options panel (Rstudio Options), and update default settings like R default directories and backup policies ➊, font size ➋, or general layout ➌. RSTUDIO TIPS 2

Pane layout Default settings may not be your taste, so here are some suggestions. Use left and right vertical frames to display code editor (Source) ➊ and R prompt (Console) ➋, then split each frame horizontally with informations on R code and objects on one side ➌ and interactive panels on the other side ➍. RSTUDIO TIPS 3

Version control RStudio automatically detect Git and Subversion clients ➊ if they are installed on your system. However, you will probably need to enable version control for projects ➋. If you have an SSH public key (e.g., to interact with GitHub, BitTorrent, or other servers), it will be detected as well ➌; otherwise, you can create one from this panel. Note: In case you installed Git from Homebrew on a Mac, then you will have to update the path by editing the file ~/.rstudio-desktop/monitored/user-settings/user-settings with vcsgitexepath="/usr/local/bin/git". RSTUDIO TIPS 4

Reporting Automatic reporting is controlled by Sweave or knitr. Be sure to check that the latter ➊ is enabled, and update LaTeX settings if needed, including default engine ➋ and previewer ➌. RSTUDIO TIPS 5

File browser RStudio features a built-in file browser that allows to navigate across your hard disk, create or delete new folder, and set any directory as the current working directory ➊. RSTUDIO TIPS 6

Package manager RStudio includes a package manager, which allows to load package ➊ with a simple click, to install new package(s) ➋, or to update all packages at once ➌. RSTUDIO TIPS 7

Online help The help panel includes an interactive previewer with in-page ➊ or full-system ➋ searching utilities for specific topics, and a built-in viewer of R HTML documentation (Manuals, Reference, and Miscellaneous Material) ➌. It is also possible to navigate back and forth using History buttons ➍. RSTUDIO TIPS 8

RStudio UI When starting from scratch, RStudio shows the R console ➋, objects and history browser ➊, and other tools ➌. Note that if a panel is minimized before RStudio is closed, it will remain as is next time RStudio is started. RStudio will use the default version of R that is recognized by your system. If you have multiple versions of R, you will have to select the one to use before launching RStudio (e.g., using RSwitch for Mac users). Likewise, the default localization will be chosen. See instructions in the R Installation and Administration manual on CRAN to get help with "Internalization and Localization". RSTUDIO TIPS 9

Creating a new R script file Creating an R script file is done via the Menu bar (File New File R Script), or by clicking on the corresponding icon ➊ on the toolbar. The same approach will be used to create R Markdown file, or R slideshow. Be careful, the default keyboard shortcut is? N, and not N as in other applications. Any new R script file will be saved automatically (even if RStudio happens to crash), and a default extension ( *.R ) will be added automatically when saving manually the file. To open an existing R script, click on the folder icon ➋ and select your file using the dialog box. RStudio can also open basic text files (with extension like, e.g., *.txt, *.dat, *.csv ). RSTUDIO TIPS 10

Editing code The code editor is composed of a main window with its own toolbar. All R expressions are highlighted depending on the type of R objects (literals, numbers, functions, etc.), and opening/closing parentheses are matched automatically ➊. There is also an autoindentation mechanism, which is useful when constructing complex expression, writing functions, or simply using for loop. It is possible to run any command by clicking the corresponding button ➋; this will send the current line or a selction to the R console. Alternatively, we can use the shortcut (or Ctrl ). To run the same code again, we click on the button next to the preceding one ➌. It is also possible to send the whole buffer to the R console by "sourcing" it silently using the corresponding button ➍; we will need to select "Source with Echo" to display intermediate results generated by R. RSTUDIO TIPS 11

Code utilities The Code editor toolbar also features various utilities that can be used when working with R code. It is possible to get help on a specific R function by clicking on F1 ➊ when the cursor is in the middle of R function name, or when it is highlighted. With userwritten functions, pressing F2 will bring the cursor back to the function directly ➋. There is also a searching utility that allows to find and/or replace ➌ specific part of R code in the current buffer. Also, code completion is available by pressing the TAB key at any time when we start writing the name of a built-in or user-written function. Notebooks ➍ are a special feature and we will talk about them later. RSTUDIO TIPS 12

R object browser When variables or functions are created in the workspace (e.g., by sending R code to the console, from the Code editor or by typing commands directly in the Console), they are listed in the Environment panel ➊, under "Global Environment" (other environments can be selected, but this is not relevant to the purpose of visualizing available R objects in the user workspace). This object browser provides almost the same information than what str() will give when typed in the Console, i.e., the size or dimension of the R variable in case of vectors and rectangular data structure (matrix and data frame), and the first 6 elements of that object ➋. RSTUDIO TIPS 13

R object viewer When a data frame is available in the workspace, basic information as those returned by dim() ➊ are displayed in the Object browser. Moreover, it is possible to display the data in a spreadsheet-like viewer by double clicking on the line where the data frame appears, or simply on the grid-like icon at the right ➋. From the Console, the same result could be obtained by typing View(d). Finally, a summary (as produced by str() ) of variables contained in this data frame can be viewed by clicking on the small arrow button ➌. From the same panel, it is possible to save an image of the R workspace ➍, to load an existing one ➎, or to clear the current workspace ➏. RSTUDIO TIPS 14

Importing external files Instead of using read.table(), read.csv(), or other related commands, RStudio offers a small utility to import external text-based files. Besides a basic preview ➊ of the content of the selected file (Import Dataset From Text File), the main options from read.table() can be updated depending on the type of data source. A live preview ➋ is offered to check that the corresponding data frame will match the raw data. The name of the data frame can also be given in the corresponding text box ➌. RSTUDIO TIPS 15

R history manager RStudio includes a specific panel to access R history, that is all commands that have been typed during the session. A searching utility ➊ is available to look for past commands. Any command that is available in the history can be sent to the Code editor ➋ or R Console ➌. Finally, it is possible to remove specific entries ➍ or to clean up all history ➎. RSTUDIO TIPS 16