## ----vignetteSetup, echo=FALSE, message=FALSE, warning =FALSE ----------- ##跟踪制作vignette花费的时间startTime <- Sys.time() ## Bib设置库('knitcitations') ##加载一个干净的书目的knitcitations cleanbib() cite_options(hyperlink = 'to.doc', citation_format = 'text', style = 'html') #注意链接现在不会显示由于以下问题# https://github.com/cboettig/knitcitations/issues/63 ##写书目信息写。bibtex(c(knitcitations = citation('knitcitations'), derfinderH = citation('derfinderHelper')[1], knitrBootstrap = citation('knitrBootstrap'), knitr = citation('knitr')[3], rmarkdown = citation('rmarkdown')), file = 'derfinderHelperRef.bib') bib <- read.bibtex('derfinderHelperRef.bib') ##分配短名称names(bib) <- c('knitcitations', 'derfinderHelper', 'knitrBootstrap', 'knitr', 'rmarkdown') ## ----createVignette, eval=FALSE, bootstrap.show。code=FALSE--------------- ## ##创建vignette ## library('knitrBootstrap') ## ## knitrBootstrapFlag <- packageVersion('knitrBootstrap') < '1.0.0' ## if(knitrBootstrapFlag) {## ## CRAN version ## library('knitrBootstrap') ## system.time(knit_bootstrap('derfinderHelper. net ')Rmd', chooser=c('boot', ## 'code'), show_code = TRUE)) ## unlink('derfinderHelper.md') ##} else {## ## GitHub版本## library('rmarkdown') ## system.time(render('derfinderHelper. md')Rmd', ## 'knitrBootstrap::bootstrap_document')) ##} ## ##注意:如果您更喜欢knitr版本,请使用:## # library('rmarkdown') ## # system.time(render('derfinder. txt ')Rmd', 'html_document')) ## ## ##提取R代码##库('knitr') ## knit('derfinderHelper. net ')Rmd', tangle = TRUE) ## ----reproducibility1, echo=FALSE, bootstrap.show。code=FALSE------------- ##图片生成日期Sys.time() ## ----reproducibility2, echo=FALSE, bootstrap.show。code=FALSE------------- ##以秒为单位的处理时间totalTime <- diff(c(startTime, Sys.time())) round(totalTime, digits=3) ## ----reproducibility3, echo=FALSE, bootstrap.show. show。代码= FALSE, bootstrap.show。消息= FALSE——# #(“devtools”)session_info会话信息图书馆 () ## ---- vignetteBiblio,结果=“黑名单”,回声= FALSE -------------------------- ## 打印书目书目()