Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering RStudio: Develop, Communicate, and Collaborate with R

You're reading from   Mastering RStudio: Develop, Communicate, and Collaborate with R Harness the power of RStudio to create web applications, R packages, markdown reports and pretty data visualizations

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher Packt
ISBN-13 9781783982547
Length 348 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Julian Hillebrand Julian Hillebrand
Author Profile Icon Julian Hillebrand
Julian Hillebrand
 Nierhoff Nierhoff
Author Profile Icon Nierhoff
Nierhoff
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Mastering RStudio – Develop, Communicate, and Collaborate with R
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
1. The RStudio IDE – an Overview FREE CHAPTER 2. Communicating Your Work with R Markdown 3. R Lesson I – Graphics System 4. Shiny – a Web-app Framework for R 5. Interactive Documents with R Markdown 6. Creating Professional Dashboards with R and Shiny 7. Package Development in RStudio 8. Collaborating with Git and GitHub 9. R for your Organization – Managing the RStudio Server 10. Extending RStudio and Your Knowledge of R Index

Using ggplot2


In the next few pages, you will see how to apply the principles of the The Grammar of Graphics with the ggplot2 package. With this package, you are able to change a lot of details in your graphics and create your own individual style. We will give you examples of some of its main settings.

Installing the ggplot2 package

You can find the ggplot2 package on CRAN, which makes it very easy to install it:

install.packages("ggplot2")

You are then able to simply load it with the following:

library(ggplot2)

Or, you can just check the box in front of the package name in the packages pane of RStudio:

Qplot() and ggplot()

The ggplot2 package provides two functions to create graphic objects:

qplot() 

ggplot()

qplot stands just for quick plot, and ggplot is an abbreviation of grammar of graphics plot, which shows its strong connection to the framework mentioned earlier.

qplot aims to be very similar to the basic plot function, and to be very simple to use. But it does not follow the full capacity...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images