2. R2
AcademyCourse Material
Slide 2
All the material related to this course are available at our website
Slides can be viewed at SlideShare
Scripts can be downloaded from GitHub
Videos can be viewed on our Youtube Channel
3. R2
AcademyIntroduction
Slide 3
Often, we get stuck while doing some analysis as either we do not know the appropriate function or the
syntax. In this tutorial, we explore the various options a new user of the R language has when (s)he are
confused or clueless. The methods we discuss can be broadly categorised into two sections:
â Built-in help system.
â Online information
In the first section, we will discuss a bunch of functions that will allow us access to the built in help
system of R. In the second section, we will look at various online sources that can supplement the built
in system.
5. R2
AcademyOutline
Slide 5
In this section, we will explore the following built in functions:
â help.start()
â help()
â ?
â ??
â help.search()
â demo()
â example()
â vignette()
â browseVignettes()
â apropos()
7. Description
The help() function returns
documentation related to functions
and data sets.
? is a shortcut for the help() function
and returns the same information.
Syntax
help(topic_name)
?topic_name
Example
help(mean)
?mean
R2
Academyhelp()
Slide 7
8. Description
The help.search() function will search for
the specified topic in all sources of
documentation and return those that match
the search string.
?? is a shortcut for the help.search()
function and returns the same information.
Syntax
help.search("topic_name")
??topic_name
Example
help.search("regression")
??regression
R2
Academyhelp.search()
Slide 8
9. R2
Academydemo()
Slide 9
Description
demo() function displays an
interactive demonstration of certain
topics provided in each R package.
Typing demo() in the console will
open a new window which will list the
demos available in all the R packages
installed.
13. R2
Academylibrary()
Slide 13
Description
Access the documentation of a
package using help inside the library
function.
Syntax
library(help = "topic_name")
Example
library(help = "ggplot2")
Note: The package need not be installed
for accessing the documentation.
14. R2
Academyvignette()
Slide 14
Description
A vignette is a long form guide to a R
package. You can access the
vignettes available by using the
vignette() function.
It will open a new window with a list of
vignettes available in the installed
packages.
Syntax
vignette()
18. R2
AcademyRSiteSearch()
Slide 18
Description
RSiteSearch() will search for the
specified topic in help pages,
vignettes and task views using the
search engine at http://search.r-
project.com and return the result in a
browser.
Syntax
RSiteSearch("topic_name")
Example
RSiteSearch("glm")
20. R2
Academyrseek
Slide 20
Description
rseek is a meta search engine created by Sasha Goodman. It will return web pages that contain
information related to the R topic specified. It narrows done the search and helps in locating materials
related to R on the web.
21. R2
AcademyR-Bloggers
Slide 21
R-Bloggers is a blog aggregator that collects content from R bloggers across the globe. It aggregates
blogs written only in english. This is the first place you want to visit if you need any information
regarding R and data analysis. It has content on wide range of topics and the latest content is delivered
to your inbox if you subscribe. If you have a blog about R, you can share it on R-Blogger.
22. R2
AcademyStack Overflow
Slide 22
Stack Overflow is a great place to visit if you are stuck with R code. Someone might have encountered
the same or similar problem and shared the solution which you can use for your analysis. In case you
do not find a solution, you can ask for help by providing a reproducible example of your analysis along
with the codes. If you can't share the data, create a dummy data similar to what you have so that others
can reproduce your analysis and provide solutions.
23. R2
AcademyNext Steps...
Slide 23
In the next module:
â Install/Load Packages
â Update/Remove Packages
â Install Packages from
â GitHub
â rForge
â Bioconductor
24. R2
Academy
Slide 24
Visit Rsquared Academy
for tutorials on:
â R Programming
â Business Analytics
â Data Visualization
â Web Applications
â Package Development
â Git & GitHub