pbs-software / pbs-modelling

R package PBSmodelling - GUI tools made easy: interact with models and explore data
2 stars 1 forks source link

showVignettes must change #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On June 27, 2013, we received this message from Kurt Hornik:

Dear maintainer,

You may have noticed that R release 3.0.0 has added support for package 
vignettes using non-Sweave vignette engines such as knitr.  As a result, the 
code in the R distribution for computing on vignettes is being refactored.  One 
consequence is that

  tools::list_files_with_type(type = "vignette")

will eventually be eliminated, as it does not easily support the notion of 
non-Sweave vignettes (and in fact lists vignette sources and not vignettes 
themselves).

Your function showVignettes() seems to be the only CRAN user of this
functionality: can you pls update your package to no longer use it?

How exactly depends on exactly what is needed: you might find that
utils::browseVignettes() already provides something very close to your needs.

Best
-k

Note from Jon S: For the record, here is the current code for
tools::list_files_with_type

function (dir, type, all.files = FALSE, full.names = TRUE, OS_subdirs = 
.OStype()) 
{
    exts <- .make_file_exts(type)
    files <- list_files_with_exts(dir, exts, all.files = all.files, 
        full.names = full.names)
    if (type %in% c("code", "docs")) {
        for (os in OS_subdirs) {
            os_dir <- file.path(dir, os)
            if (file_test("-d", os_dir)) {
                os_files <- list_files_with_exts(os_dir, exts, 
                  all.files = all.files, full.names = FALSE)
                os_files <- file.path(if (full.names) 
                  os_dir
                else os, os_files)
                files <- c(files, os_files)
            }
        }
    }
    if (type %in% c("code", "docs")) {
        files <- files[grep("^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]", 
            basename(files))]
    }
    if (type %in% "demo") {
        files <- files[grep("^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]", 
            basename(files))]
    }
    files
}

Original issue reported on code.google.com by schnu...@shaw.ca on 24 Aug 2013 at 2:04

GoogleCodeExporter commented 9 years ago
This was fixed Jul 16, 2013 by r261.

Original comment by rowan.ha...@dfo-mpo.gc.ca on 26 Aug 2013 at 2:58