This works:
help(package="ggplot2")
This does not:
x <-"ggplot2"
help(package=x)
# Error in find.package(pkgName, lib.loc, verbose = verbose) :
# there is no package called ‘x’
How can I make it so that I can pass x to help to open the help page?
Put the variable in parentheses:
The help file for
?helprather cryptically states for the package argument: