Available CRAN Vignettes

There is a function available.packages()to display all the packages available on CRAN. Is there a similar function to search for all available vignettes? If not, how would I get a list of all the vignettes and packages that they are associated with?

As an angular case, to keep in mind, the package data.tablehas 3 vignettes associated with it.

EDIT: In response from Andrie, I understand that I was not clear. I know about the vignette function to find all the available local vignettes after I can get all the vignettes of all the packages on CRAN.

+5
source share
2 answers

, - SO ( ) , , available.packages(), readRDS to @CRAN/web/packages/packages.rds ( Jeroen Ooms), , ...

, 100 ( 44 )

pkgs <- unname(available.packages()[, 1])[1:100]
vindex_urls <- paste0(getOption("repos"),"/web/packages/", pkgs, 
    "/vignettes/index.rds", sep = "")
getf <- function(x) {
      ## I think there should be a way to do this directly
      ## with readRDS(url(...)) but I can't get it to work
    suppressWarnings(
              download.file(x,"tmp.rds",quiet=TRUE))
    readRDS("tmp.rds")
}
library(plyr)
vv <- ldply(vindex_urls,
            .progress="text",
            function(x) {
                if (inherits(z <- try(getf(x),silent=TRUE),
                    "try-error")) NULL else z
            })
tmpf <- function(x,n) { if (is.null(x)) NULL else
                            data.frame(pkg=n,x) }
vframe <- do.call(rbind,mapply(tmpf,vv,pkgs))
rownames(vframe) <- NULL
head(vframe[,c("pkg","Title")])

, / , , , . / . , ( - ) / - , URL-, ... HTML-, , ( Viagra $$ PROFIT $$...)

edit: RDS , try

+5

vignette() browseVignettes() , .

vignette(package="data.table")

Vignettes in package ‘data.table’:

datatable-faq                         Frequently asked questions (source, pdf)
datatable-intro                       Quick introduction (source, pdf)
datatable-timings                     Timings of common tasks (source, pdf)

browseVignettes() , - :

browseVignettes(package="data.table")

Vignettes found by browseVignettes(package = "data.table")

Vignettes in package data.table

Frequently asked questions - PDF  R  LaTeX/noweb 
Quick introduction - PDF  R  LaTeX/noweb 
Timings of common tasks - PDF  R  LaTeX/noweb 
+2

All Articles