pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/R-knitr Update to 1.13



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b5222fcabdba
branches:  trunk
changeset: 350485:b5222fcabdba
user:      wen <wen%pkgsrc.org@localhost>
date:      Thu Jul 28 14:37:35 2016 +0000

description:
Update to 1.13

Upstream changes:

CHANGES IN knitr VERSION 1.13

NEW FEATURES

    code chunks that generate metadata may be cached now; it requires htmlwidgets >= v0.6 and htmltools >= 0.3.3 if you cache code chunks that contain HTML widgets or Shiny inputs/outputs (#1158)

    when the output format is not HTML, HTML widgets used to fail to render; now knitr will try to generate static screenshots for HTML widgets automatically using the webshot package; you can 
specify alternative screenshots via the chunk option screenshot.alt (which takes a character vector of image paths), and pass more options to webshot::webshot() via the chunk option screenshot.opts, 
e.g. list(delay = 3, cliprect = 'viewport')

    added two functions include_url() and include_app() to embed URLs in the output (the latter is for Shiny app URLs); when the output format is HTML, iframe will be used; otherwise screenshots of 
the URLs will be used

    screenshotting for HTML widgets and URLs can be forced for all output formats via the chunk option screenshot.force = TRUE; if you set the chunk option screenshot.force = FALSE, knitr will just 
render these content normally and not take screenshots

    added a new chunk option fig.link, which can be used to attach hyperlinks on figures, e.g. you can add a link to a screenshot of a Shiny app so that readers can check out the actual live app 
after clicking on the static screenshot (this chunk option currently only works for Markdown and LaTeX output)

    syntactical errors in code chunks will be allowed when the chunk option error = TRUE and the package version of evaluate is at least 0.8.4; previously knitr would just stop on parsing errors 
(hadley/evaluate#65)

    PNG/JPEG images included via include_graphics() also respects the chunk option dpi now; if it is numeric and the chunk option out.width is not set, the output width (in inches) of an image will 
be automatically calculated from the actual width (in pixels) divided by dpi; note this feature requires the packages png and/or jpeg to be installed, and you can disable the feature using dpi = NA 
(thanks, @hadley, rstudio/bookdown#38)

    added a new hook function named evaluate in knit_hooks so that users can redefine a evaluator to evaluate the code chunk; the default is evaluate::evaluate(), and your custom evaluator must be 
compatible with evaluate::evaluate() in terms of the argument names and the data structure of the returned value (a list of values with special classes)

    added a new function combine_words() to combine multiple words / phrases into a single string, which may be useful in inline R expressions, e.g. combine_words(c('a', 'b', 'c')) returns a, b, and c

    render_markdown() gained a new argument fence_char to customize the character to be used as the code blocks fence, e.g. it can be a backtick, or a tilde, depending on the Markdown rendering 
engine (thanks, @tinyheero, #1161)

    the pandoc() function no longer assumes Markdown input (thanks, @scls19fr, #1170)

    added a new function knit_meta_add() so that users can manually inject metadata into the current knitr session

    for the tikz engine, if fig.ext = 'svg', dvisvgm will be called to convert the DVI output of TikZ to SVG; you need to install dvisvgm, and Windows users have to install GhostScript as well 
(thanks, @dkilfoyle, #1177)

    new js and css engines which surround their content with <script> and <style> tags respecitvely, and print no output when not in an HTML document

    for LaTeX tables, kable() supports short captions now via the caption.short argument, e.g. kable(..., caption = 'A long caption', caption.short = 'A short caption') (thanks, @ismayc, #1199)

    added three global R options knitr.sanitize.errors, knitr.sanitize.warnings, and knitr.sanitize.messages to mask or change the messages, e.g. if options(knitr.sanitize.errors = TRUE) and the 
chunk option error = TRUE, the actual error message will be replaced by a character string like "An error occurred"; these options can also accept character values so you can customize the messages 
to be displayed, e.g. options(knitr.sanitize.warnings = 'You had a warning from the code'); see rstudio/shiny#1123 for the motivation of these options

BUG FIXES

    when the chunk option cache.rebuild = TRUE, the cache database should be rewritten (thanks, Oleg Mayba)

    include_graphics() did not work in inline R expressions (thanks, @WastlM, #1166)

    the cex parameter was not correctly restored in the case of opts_knit$set(global.par = TRUE) (http://stackoverflow.com/q/35606445/559676)

    for Rnw documents, when there are two instances of \documentclass{}, knitr might mistakenly treats the second instance as the the actual command to declare the document class (thanks, #1180, 
@ekstroem)

    corrected the environment for evaluating R scripts in stitch_rhtml() and stitch_rmd() (thanks, @Hughan, #1207)

MAJOR CHANGES

    the default value of the package option eval.after is changed from NULL to fig.cap, i.e. the figure caption will always be evaluated after a code chunk is evaluated (thanks, @JoshOBrien, #1165)

    the function eclipse_theme() has been removed since the website eclipsecolorthemes.org has been down for a long time

diffstat:

 print/R-knitr/Makefile |   4 ++--
 print/R-knitr/distinfo |  10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (33 lines):

diff -r de8796ca174b -r b5222fcabdba print/R-knitr/Makefile
--- a/print/R-knitr/Makefile    Thu Jul 28 14:33:20 2016 +0000
+++ b/print/R-knitr/Makefile    Thu Jul 28 14:37:35 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2016/04/16 15:04:36 wen Exp $
+# $NetBSD: Makefile,v 1.4 2016/07/28 14:37:35 wen Exp $
 
 CATEGORIES=    print
 MASTER_SITES=  ${MASTER_SITE_R_CRAN:=contrib/}
@@ -9,7 +9,7 @@
 LICENSE=       gnu-gpl-v2 OR gnu-gpl-v3
 
 R_PKGNAME=     knitr
-R_PKGVER=      1.12.3
+R_PKGVER=      1.13
 
 DEPENDS+=      R-evaluate>=0.8:../../devel/R-evaluate
 DEPENDS+=      R-digest>=0.6.4:../../security/R-digest
diff -r de8796ca174b -r b5222fcabdba print/R-knitr/distinfo
--- a/print/R-knitr/distinfo    Thu Jul 28 14:33:20 2016 +0000
+++ b/print/R-knitr/distinfo    Thu Jul 28 14:37:35 2016 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2016/04/16 15:00:48 wen Exp $
+$NetBSD: distinfo,v 1.4 2016/07/28 14:37:35 wen Exp $
 
-SHA1 (R/knitr_1.12.3.tar.gz) = 35574f6f163d9e39bd1695eb67f1d7dc5cab88ff
-RMD160 (R/knitr_1.12.3.tar.gz) = d23485cbf9e35f16ddcfa52ab3080fcbea2d55bb
-SHA512 (R/knitr_1.12.3.tar.gz) = 8baef158d6b34e7026936db26f849c2c162babfab651ef277cf3f22462154e03d74996dfbfcd928043ec11cae178e04de796913fe3887950d8d860295280bf56
-Size (R/knitr_1.12.3.tar.gz) = 830827 bytes
+SHA1 (R/knitr_1.13.tar.gz) = 9f3538ddad938cca370b100b90262816bd04efbd
+RMD160 (R/knitr_1.13.tar.gz) = eb61837703ec4d30c46817347e83a1fc079e2c36
+SHA512 (R/knitr_1.13.tar.gz) = dce55ccc55d0bc726bf6ffbcaeb065161de7ac78529ad7df1073a092a30a876cd4dfd1c309f8cd91c7411469945c13640f6e935cca5213ecd546d2435b46da1f
+Size (R/knitr_1.13.tar.gz) = 886610 bytes



Home | Main Index | Thread Index | Old Index