help()
or ?
¶?print
# is same as
help(print) # or help("plot")
help.search()
or ??
¶??plot
starting httpd help server ... done
help.search("plot")
apropos()
¶Find Objects by (Partial) Name
returns a character vector giving the names of objects in the search list matching
apropos("wh")
apropos("ls")
apropos("qp")
?qplot
?qqplot
package ? <pckg name>
¶Details about package
package ? ggplot2 # details about the package without using library but the package should be installed into our system
package ? stringr
{r}
Error in `?`(package, stringr): no documentation of type ‘package’ and topic ‘stringr’ (or error in processing help)
Traceback:
1. `?`(package, stringr)
2. stop(gettextf("no documentation of type %s and topic %s (or error in processing help)",
. sQuote(type), sQuote(topicExpr)), domain = NA)
install.packages('stringr')
Installing package into ‘/home/nbuser/R’ (as ‘lib’ is unspecified)
package ? stringr
library(help='<pckg name>')
¶library(help='ggplot2')
library(help='stringr')
ls()
or objects()
¶ls and objects return a vector of character strings giving the names of the objects in the specified environment.
{r}
#without loading ggplot2 package into current session (gives an error)
ls("package:ggplot2")
{r}
Error in as.environment(pos): no item called "package:ggplot2" on the search list
Traceback:
1. ls("package:ggplot2")
library(ggplot2) # loading package into current session
ls("package:ggplot2") # list out the objects present in ggplot2
# or
head(objects("package:ggplot2"))
ls.str()
or lsf.str()
¶library(ggplot2)
head(lsf.str("package:ggplot2"),50)
head(ls.str("package:ggplot2"))
library(ggplot2)
ls("package:stringr")
args()
¶args(annotate)
function (geom, x = NULL, y = NULL, xmin = NULL, xmax = NULL,
ymin = NULL, ymax = NULL, xend = NULL, yend = NULL, ...,
na.rm = FALSE)
NULL
data()
to list the available data sets¶data() #list out all the databases on the search list
data(package="ggplot2") #list out the databases present in ggplot2 package
try(data(package = "survival")) # list 'survival' data sets
help(pbc, package = "survival") # display pbc data help page
browseVignettes()
and vignette()
¶browseVignettes()
library(grid)
vignette()
vignette("abcvignette")
Warning message: "vignette 'abcvignette' not found"
vignette(package = "ggplot2")
vignette("ggplot2-specs")
vignette("extending-ggplot2")
search()
# Notice that the loading of a new package extends the search list.
library(ggplot2)
search()
RSiteSearch("ggplot2")
¶RSiteSearch("ggplot2")
A search query has been submitted to http://search.r-project.org The results page should open in your browser shortly