# NOT RUN {
## List vignettes from all *attached* packages
vignette(all = FALSE)
## List vignettes from all *installed* packages (can take a long time!):
vignette(all = TRUE)
## The grid intro vignette -- open it
# }
# NOT RUN {
vignette("grid") # calling print()
# }
# NOT RUN {
## The same (conditional on existence of the vignettte).
## Note that 'package = *' is much faster in the case of many installed packages:
if(!is.null(v1 <- vignette("grid", package="grid"))) {
# }
# NOT RUN {
v1 # calling print(.)
# }
# NOT RUN {
str(v1)
## Now let us have a closer look at the code
# }
# NOT RUN {
<!-- %% print(utils:::getRcode(v1)) # the R file name -->
# }
# NOT RUN {
# }
# NOT RUN {
<!-- %% if(interactive()) # "display" it -->
# }
# NOT RUN {
# }
# NOT RUN {
<!-- %% file.show(utils:::getRcode(v1)) -->
# }
# NOT RUN {
# }
# NOT RUN {
<!-- %% ## or even more interactively: -->
# }
# NOT RUN {
edit(v1) # e.g., to send lines ...
# }
# NOT RUN {
}# if( has vignette "installed")
## A package can have more than one vignette (package grid has several):
vignette(package = "grid")
if(interactive()) {
## vignette("rotated")
## The same, but without searching for it:
vignette("rotated", package = "grid")
}
# }
Run the code above in your browser using DataLab