From r-lib/pkgdown#545
use_vignette() could be more proactive about preventing creation of invalid filenames.
use_vigette("01-test") will succeed in creating vignettes/01-test.Rmd, which will then throw a warning upon R CMD CHECK.
W checking package subdirectories ...
Subdirectory 'inst/doc' contains invalid file names:
‘01-test.Rmd’ ‘01-test.html’
Please remove or rename the files.
See section ‘Package subdirectories’ in the ‘Writing R Extensions’
manual.
Here's a reprex:
library(fs)
library(usethis)
library(rcmdcheck)
create_package(dir_create(file_temp()))
#> ✔ Setting active project to '/private/var/folders/xw/74y8c7mn7c984xb9bg9vtktc0000gn/T/RtmpP4WH3A/filed8e47be71cfe'
#> ✔ Creating 'R/'
#> ✔ Creating 'man/'
#> ✔ Writing 'DESCRIPTION'
#> ✔ Writing 'NAMESPACE'
use_vignette("01-test")
#> ✔ Adding 'knitr' to Suggests field in DESCRIPTION
#> ✔ Setting VignetteBuilder field in DESCRIPTION to 'knitr'
#> ✔ Adding 'rmarkdown' to Suggests field in DESCRIPTION
#> ✔ Creating 'vignettes/'
#> ✔ Adding '*.html', '*.R' to 'vignettes/.gitignore'
#> ✔ Adding 'inst/doc' to '.gitignore'
#> ✔ Creating 'vignettes/01-test.Rmd'
#> ● Edit vignettes/01-test.Rmd
rcmdcheck(proj_path())
#> ── R CMD build ────────────────────────────────────────────────────────────
#>
checking for file ‘.../DESCRIPTION’ ...
checking for file ‘.../DESCRIPTION’ ...
✔ checking for file ‘.../DESCRIPTION’
#>
─ preparing ‘filed8e47be71cfe’:
#>
checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
✔ checking DESCRIPTION meta-information
#>
─ installing the package to build vignettes
#>
creating vignettes ...
creating vignettes ...
✔ creating vignettes (1.4s)
#>
─ excluding invalid files
#>
Subdirectory 'inst/doc' contains invalid file names:
#> ‘01-test.Rmd’ ‘01-test.html’
#>
─ checking for LF line-endings in source and make files and shell scripts
#>
─ checking for empty or unneeded directories
#> Removed empty directory ‘filed8e47be71cfe/R’
#> Removed empty directory ‘filed8e47be71cfe/man’
#>
─ building ‘filed8e47be71cfe_0.0.0.9000.tar.gz’
#>
#>
── R CMD check ────────────────────────────────────────────────────────────
#>
─ using log directory ‘/private/var/folders/xw/74y8c7mn7c984xb9bg9vtktc0000gn/T/RtmpP4WH3A/filed8e46db0a364/filed8e47be71cfe.Rcheck’
#>
─ using R version 3.5.1 (2018-07-02)
#> ─ using platform: x86_64-apple-darwin15.6.0 (64-bit)
#> ─ using session charset: UTF-8
#>
checking for file ‘filed8e47be71cfe/DESCRIPTION’ ...
✔ checking for file ‘filed8e47be71cfe/DESCRIPTION’
#>
─ this is package ‘filed8e47be71cfe’ version ‘0.0.0.9000’
#> ─ package encoding: UTF-8
#> checking package namespace information ...
✔ checking package namespace information
#> checking package dependencies ...
✔ checking package dependencies (12.3s)
#>
✔ checking if this is a source package
#> ✔ checking if there is a namespace
#>
checking for executable files ...
✔ checking for executable files
#>
✔ checking for hidden files and directories
#> ✔ checking for portable file names
#> checking for sufficient/correct file permissions ...
✔ checking for sufficient/correct file permissions
#> checking whether package ‘filed8e47be71cfe’ can be installed ...
✔ checking whether package ‘filed8e47be71cfe’ can be installed (705ms)
#>
checking installed package size ...
✔ checking installed package size
#>
✔ checking package directory
#> ✔ checking ‘build’ directory
#> checking DESCRIPTION meta-information ...
W checking DESCRIPTION meta-information
#>
Non-standard license specification:
#> What license it uses
#> Standardizable: FALSE
#>
checking top-level files ...
✔ checking top-level files
#> checking for left-over files ...
✔ checking for left-over files
#> checking index information ...
✔ checking index information
#>
checking package subdirectories ...
W checking package subdirectories
#>
Subdirectory 'inst/doc' contains invalid file names:
#> ‘01-test.Rmd’ ‘01-test.html’
#> Please remove or rename the files.
#> See section ‘Package subdirectories’ in the ‘Writing R Extensions’
#> manual.
#> checking whether the package can be loaded ...
✔ checking whether the package can be loaded
#>
checking whether the package can be loaded with stated dependencies ...
✔ checking whether the package can be loaded with stated dependencies
#>
checking whether the package can be unloaded cleanly ...
✔ checking whether the package can be unloaded cleanly
#>
checking whether the namespace can be loaded with stated dependencies ...
✔ checking whether the namespace can be loaded with stated dependencies
#>
checking whether the namespace can be unloaded cleanly ...
✔ checking whether the namespace can be unloaded cleanly
#>
checking loading without being on the library search path ...
✔ checking loading without being on the library search path
#>
checking installed files from ‘inst/doc’ ...
✔ checking installed files from ‘inst/doc’
#>
checking files in ‘vignettes’ ...
✔ checking files in ‘vignettes’
#>
checking examples ...
─ checking examples ... NONE
#>
checking for unstated dependencies in vignettes ...
✔ checking for unstated dependencies in vignettes
#>
✔ checking package vignettes in ‘inst/doc’
#>
checking running R code from vignettes ...
─ checking running R code from vignettes ...
#> ‘01-test.Rmd’ using ‘UTF-8’ ...
‘01-test.Rmd’ using ‘UTF-8’ ... OK
#>
NONE
#> checking re-building of vignette outputs ...
✔ checking re-building of vignette outputs (1.2s)
#>
checking PDF version of manual ...
W checking PDF version of manual
#> LaTeX errors when creating PDF version.
#> This typically indicates Rd problems.
#>
checking PDF version of manual without hyperrefs or index ...
✔ checking PDF version of manual without hyperrefs or index (415ms)
#>
#> See
#> ‘/private/var/folders/xw/74y8c7mn7c984xb9bg9vtktc0000gn/T/RtmpP4WH3A/filed8e46db0a364/filed8e47be71cfe.Rcheck/00check.log’
#> for details.
#>
#>
#>
#> ── R CMD check results ─────────────────── filed8e47be71cfe 0.0.0.9000 ────
#> Duration: 17.5s
#>
#> ❯ checking DESCRIPTION meta-information ... WARNING
#> Non-standard license specification:
#> What license it uses
#> Standardizable: FALSE
#>
#> ❯ checking package subdirectories ... WARNING
#> Subdirectory 'inst/doc' contains invalid file names:
#> ‘01-test.Rmd’ ‘01-test.html’
#> Please remove or rename the files.
#> See section ‘Package subdirectories’ in the ‘Writing R Extensions’
#> manual.
#>
#> ❯ checking PDF version of manual ... WARNING
#> LaTeX errors when creating PDF version.
#> This typically indicates Rd problems.
#>
#> 0 errors ✔ | 3 warnings ✖ | 0 notes ✔
Created on 2018-12-20 by the reprex package (v0.2.1)
From r-lib/pkgdown#545
use_vignette()could be more proactive about preventing creation of invalid filenames.use_vigette("01-test")will succeed in creatingvignettes/01-test.Rmd, which will then throw a warning uponR CMD CHECK.Here's a reprex:
Created on 2018-12-20 by the reprex package (v0.2.1)