Learn RStudio IDE: Quick, Effective, and Productive Data Science
()
About this ebook
Finally, you will see how to save a ton of time by adopting best practices and using packages to extend RStudio. Learn RStudio IDE is a quick, no-nonsense tutorial of RStudio that will give you a head start to develop the insights you need in your data science projects.
What YouWill Learn
- Quickly, effectively, and productively use RStudio IDE for building data science applications
- Install RStudio and program your first Hello World application
- Adopt the RStudio workflow
- Make your code reusable using RStudio
- Use RStudio and Shiny for data visualization projects
- Debug your code with RStudio
- Import CSV, SPSS, SAS, JSON, and other data
Who This Book Is For
Programmers who want to start doing data science, but don’t know what tools to focus on to get up to speed quickly.
Read more from Matthew Campbell
Dead in the Water: A True Story of Hijacking, Murder, and a Global Maritime Conspiracy Rating: 0 out of 5 stars0 ratingsSwift Quick Syntax Reference Rating: 0 out of 5 stars0 ratingsSinister City Rating: 0 out of 5 stars0 ratings
Related to Learn RStudio IDE
Related ebooks
Developing Software Installers Rating: 0 out of 5 stars0 ratingsMeteor Design Patterns Rating: 0 out of 5 stars0 ratingsPython for Probability, Statistics, and Machine Learning Rating: 0 out of 5 stars0 ratingsBest Free Open Source Office Software For Windows 10 Bilingual Edition English Germany Rating: 0 out of 5 stars0 ratingsPython Apps on Visual Studio Code: Develop apps and utilize the true potential of Visual Studio Code (English Edition) Rating: 0 out of 5 stars0 ratingsBeginning T-SQL Rating: 0 out of 5 stars0 ratingsMission Ruby Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Server 2005: A Beginner''s Guide Rating: 0 out of 5 stars0 ratingsLearn Data Science Using SAS Studio: A Quick-Start Guide Rating: 0 out of 5 stars0 ratingsGetting Started with Visual Studio 2019: Learning and Implementing New Features Rating: 0 out of 5 stars0 ratingsHow to Make a Game: Go From Idea to Publication Avoiding the Common Pitfalls Along the Way Rating: 0 out of 5 stars0 ratingsHTML 5 Shoot 'em Up in an Afternoon Rating: 0 out of 5 stars0 ratingsBeginning Oracle Database 12c Administration: From Novice to Professional Rating: 0 out of 5 stars0 ratingsBeginning Programming Using Retro Computing: Learn BASIC with a Commodore Emulator Rating: 0 out of 5 stars0 ratingsPractical GameMaker Projects: Build Games with GameMaker Studio 2 Rating: 0 out of 5 stars0 ratingsSimple Computer Security: Disinfect Your PC Rating: 0 out of 5 stars0 ratingsWindows 11 Mastery: From Foundation to Mastery Rating: 0 out of 5 stars0 ratingsEmail Spam: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsWindows 11 Rating: 5 out of 5 stars5/5Linux Bible 2010 Edition: Boot Up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 13 Other Distributions Rating: 0 out of 5 stars0 ratingsData Recovery A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsElements of Android Q Rating: 0 out of 5 stars0 ratingsComputing and Information Technology V11 Home Study Rating: 0 out of 5 stars0 ratingsExcel Course Rating: 0 out of 5 stars0 ratingsComplex Binary Number System: Algorithms and Circuits Rating: 0 out of 5 stars0 ratingsHyperparameter Optimization in Machine Learning: Make Your Machine Learning and Deep Learning Models More Efficient Rating: 0 out of 5 stars0 ratingsC Programs To Become Expert In Programming Rating: 0 out of 5 stars0 ratingsEssential Excel 2019: A Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsPC Interfacing Pocket Reference Rating: 0 out of 5 stars0 ratingsLearning Joomla! 3 Extension Development Rating: 0 out of 5 stars0 ratings
Programming For You
SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsCoding All-in-One For Dummies Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5HTML in 30 Pages Rating: 5 out of 5 stars5/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPython: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5C Programming For Beginners: The Simple Guide to Learning C Programming Language Fast! Rating: 5 out of 5 stars5/5C# Programming from Zero to Proficiency (Beginner): C# from Zero to Proficiency, #2 Rating: 0 out of 5 stars0 ratingsProgramming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Beginning Programming with C++ For Dummies Rating: 4 out of 5 stars4/5Coding with JavaScript For Dummies Rating: 0 out of 5 stars0 ratings
Reviews for Learn RStudio IDE
0 ratings0 reviews
Book preview
Learn RStudio IDE - Matthew Campbell
© Matthew Campbell 2019
Matthew CampbellLearn RStudio IDEhttps://doi.org/10.1007/978-1-4842-4511-8_1
1. Installing RStudio
Matthew Campbell¹
(1)
Yardley, PA, USA
RStudio is an integrated development environment (IDE) that adds modern features like syntax highlighting and code refactoring to R. The strength of RStudio is that it brings all the features that you need together in one place. Before we install RStudio, we will need to install the latest version of R for our operating system as well as another program called git. Both of these software packages are integrated into RStudio, but they do not come with the RStudio IDE.
R is a statistical programming language and we need this language to use RStudio. Git is a popular version control system that will be integrated into RStudio. Version control systems like git are used to manage copies of the code you are working on. Git helps you see the differences between versions of a file so that you can get insight into why one version of your code behaves differently than another version. Git is also required to use Github, an online community where programmers share code and projects.
Install R
R is a free open source software used for statistical programming and graphics. You can get the latest version of R from CRAN, the Comprehensive R Network. This is a network of mirrored servers that have copies of R as well as R packages. R packages are extensions to the core R programming language contributed by R users in the community.
To install R, go to this URL: https://cran.r-project.org/mirrors.html and you will see a list like the one featured in Figure 1-1.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig1_HTML.jpgFigure 1-1
CRAN mirrors
Scroll down the list of servers and find the one that is geographically closest to you and then click the link. Don’t worry too much about getting the absolute closest server, just picking any from your country should be fine. If you find a broken link, simply go back and try another server. You will be brought to a new screen that lists versions of R for Windows and Mac as you can see in Figure 1-2.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig2_HTML.jpgFigure 1-2
Installing R on CRAN
Click the link for your operating system. Each operating system has different instructions to set up R.
Installing R on Mac
If you are installing R on Mac, you will be presented with a lot of detail about the different R releases. Most people will simply go to the area toward the middle of the page under the heading Latest release as shown in Figure 1-3: and then click the file that ends in with the .pkg file extension. The exact name of the file will be different based on the most current release of the installer.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig3_HTML.jpgFigure 1-3
Mac R installer
Click the pkg link to install the most recent version of R. Note that if you have a special need for an older version of R, you can scroll down to see options on installing previous version of R. The pkg file will appear in your Downloads folder. Go to your Downloads folder and click the pkg file to install R. A screen like Figure 1-4 will appear.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig4_HTML.jpgFigure 1-4
Installing R on Mac
You will get a series of screens like the one in Figure 1-4. Click Continue for each screen. At one point, a model dialog box will pop up asking for you to agree to the software license. Click Agree to move on. Next, you will be presented with an option to install to a specific disk as shown in Figure 1-5.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig5_HTML.jpgFigure 1-5
Choosing R location
Most people will simply choose the option to install for all users. Choose the first option and click the Continue button. At the next screen, click the Install button. You will be prompted for your Mac password since the R installer will make changes to your Mac. Type that in to continue. R will install, and when everything is done you should see a screen like in Figure 1-6.
../images/478254_1_En_1_Chapter/478254_1_En_1_Fig6_HTML.jpgFigure 1-6
Successful R installation
Click the Close button and R will be installed on your Mac. You will find R in your Applications folder. Double click the R.app program in your Applications folder to verify that you have R installed and working. The native R Console screen will appear. You can play around with the system here if you already know a little R, or you can simply exit the program. We will revisit using R once RStudio is installed.
Installing R on Windows
Once you click the R for Windows link, you will see a page of instructions. Click on install R for the first time
as shown in Figure 1-7.
Figure 1-7
Installing R on Windows
On the next page, there will be a link to download the R installer. Click that to get the windows installer. It will be named Download R for Windows
. Click that to download the R installer. In a moment, you will find the R install executable file in your Downloads folder.
Double click the installer file and click through the prompts. Simply select the defaults and then let the installer finish.
Installing R on Linux
Each version of Linux has different set up instructions to follow to install R. Generally, you will use a package manager to install R from a command line. You can do something like this:
sudo apt-get update
sudo apt-get install r-base r-base-dev
However, each version of Linux might be a little bit different here, and you should double check the CRAN website to see any more detail on what you may need to do for your version of Linux. Click Download R for Linux
link on https://cran.r-project.org and then choose your version of Linux to get extra guidance.
Install Git
Git is a popular version control system that is used to manage different versions of your code files. RStudio will integrate git into your workflow and help you visualize your work.
Install Git on Mac
To install git on Mac, go to this URL: https://git-scm.com/download/mac and if your download does not start immediately, click the text click here to download manually
to download the git installer. Double click the file that appears in your Downloads folder. In the folder that appears, click the pkg file to begin the installation process. You may get a security notification that looks like the dialog box pictured in Figure 1-8.
Figure 1-8
Security warning on Mac
You can override this security feature by going to your Mac’s Security and Privacy setting’s general tab and then selecting Open Anyway
next to the file that you downloaded. See Figure 1-9 for an example.