2019-08-08 21:53:36 +02:00
|
|
|
# $NetBSD: Makefile,v 1.8 2019/08/08 19:53:55 brook Exp $
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
|
2019-08-08 21:53:36 +02:00
|
|
|
R_PKGNAME= knitr
|
|
|
|
R_PKGVER= 1.23
|
|
|
|
CATEGORIES= print
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2016-04-16 17:04:36 +02:00
|
|
|
COMMENT= General-purpose package for dynamic report generation in R
|
2019-07-31 22:46:05 +02:00
|
|
|
LICENSE= gnu-gpl-v1 OR gnu-gpl-v2 OR gnu-gpl-v3
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
|
Update to 1.15.1
Upstream changes:
CHANGES IN knitr VERSION 1.15.1
@yihui yihui released this on 23 Nov 2016 · 49 commits to master since this release
NEW FEATURES
added a new hook function hook_pngquant() that can call pngquant to optimize PNG images (thanks, @slowkow, #1320)
BUG FIXES
not really a knitr bug, but knit_params() should be better at dealing with multibyte characters now due to the bug fix in the yaml package viking/r-yaml#6
Downloads
Source code (zip)
Source code (tar.gz)
v1.15
b08a7bc
CHANGES IN knitr VERSION 1.15
@yihui yihui released this on 10 Nov 2016 · 63 commits to master since this release
NEW FEATURES
NA values can be displayed using different characters (including empty strings) in kable(); you can set the option knitr.kable.NA, e.g. options(knitr.kable.NA = '') to hide NA values (#1283)
added a fortran95 engine (thanks, @stefanedwards, #1282)
added a block2 engine for R Markdown documents as an alternative to the block engine; it should be faster and supports arbitrary Pandoc's Markdown syntax, but it is essentially a hack; note when the output format is LaTeX/PDF, you have to define \let\BeginKnitrBlock\begin \let\EndKnitrBlock\end in the LaTeX preamble
figure captions specified in the chunk option fig.cap are also applied to HTML widgets (thanks, @byzheng, rstudio/bookdown#118)
when the chunk option fig.show = 'animate' and ffmpeg.format = 'gif', a GIF animation of the plots in the chunk will be generated for HTML output (https://twitter.com/thomasp85/status/785800003436421120)
added a width argument to write_bib() so long lines in bib entries can be wrapped
the inline syntax r#code is also supported besides r code; this can make sure the inline expression is not split when the line is wrapped (thanks, Dave Jarvis)
provided a global R option knitr.use.cwd so users can choose to evaluate the R code chunks in the current working directory after setting options(knitr.use.cwd = TRUE); the default is to evaluate code in the directory of the input document, unless the knitr option opts_knit$set(root.dir = ...) has been set
if options(knitr.digits.signif = TRUE), numbers from inline expressions will be formatted using getOption('digits') as the number of significant digits, otherwise (the default behavior) getOption('digits') is treated as the number of decimal places (thanks, @numatt, #1053)
the chunk option engine.path can also be a list of paths to the engine executables now, e.g., you can set knitr::opts_chunk$set(engine.path = list(python = '/anaconda/bin/python', perl = '/usr/local/bin/perl')), then when a python code chunk is executed, /anaconda/bin/python will be called instead of the system default (rstudio/rmarkdown#812)
introduced a mechanism to protect text output in the sense that it will not be touched by Pandoc during the conversion from R Markdown to another format; this is primarily for package developers to extend R Markdown; see ?raw_output for details (which also shows new functions extract_raw_output() and restore_raw_output())
MAJOR CHANGES
the minimal version of R required for knitr is 3.1.0 now (#1269)
the formatR package is an optional package since the default chunk option tidy = FALSE has been there for a long time; if you use tidy = TRUE, you need to install formatR separately if it is not installed
:set +m is no longer automatically added to haskell code chunks (#1274)
MINOR CHANGES
the package option opts_knit$get('stop_on_error') has been removed
the confusing warning message about knitr::knit2html() when buiding package vignettes using the knitr::rmarkdown engine without pandoc/pandoc-citeproc has been removed (#1286)
the default value of the quiet argument of plot_crop() was changed from !opts_knit$get('progress') to TRUE, i.e., by default the messages from cropping images are suppressed
BUG FIXES
the chunk option cache.vars did not really behave like what was documented (thanks, @simonkth, #1280)
asis_output() should not be merged with normal character output when results='hold' (thanks, @kevinushey, #1310)
Downloads
Source code (zip)
Source code (tar.gz)
v1.14
b34be0d
CHANGES IN knitr VERSION 1.14
@yihui yihui released this on 12 Aug 2016 · 845 commits to master since this release
NEW FEATURES
improved caching for Rcpp code chunks: the shared library built from the C++ code will be preserved on disk and reloaded the next time if caching is enabled (chunk option cache = TRUE), so that the exported R functions are still usable in later R code chunks; note this feature requires Rcpp >= 0.12.5.6 (thanks, @jjallaire, #1239)
added a helper function all_rcpp_labels(), which is simply all_labels(engine == 'Rcpp') and can be used to extract all chunk lables of Rcpp chunks
added a new engine named sql that uses the DBI package to execute SQL queries, and optionally assign the result to a variable in the knitr session; see http://rmarkdown.rstudio.com/authoring_knitr_engines.html for details (#1241)
fig.keep now accepts numeric values to index low-level plots to keep (#1265)
BUG FIXES
fixed #1211: pandoc('foo.md') generates foo_utf8.html instead of foo.html by default
fixed #1236: include = FALSE for code chunks inside blockquotes did not work (should return > instead of a blank line) (thanks, @fmichonneau)
fixed #1217: define the command \hlipl for syntax highlighting for Rnw documents (thanks, @conjugateprior)
fixed #1215: restoring par() settings might fail when the plot window is partitioned, e.g. par(mfrow = c(1, 2)) (thanks, @jrwishart @jmichaelgilbert)
fixed #1250: in the quiet mode, knit() should not emit the message "processing file ..." when processing child documents (thanks, @KZARCA)
MAJOR CHANGES
knitr will no longer generate screenshots automatically for HTML widgets if the webshot package or PhantomJS is not installed
MINOR CHANGES
if dev = 'cairo_pdf', the cairo_pdf device will be used to record plots (previously the pdf device was used) (#1235)
LaTeX short captions now go up to the first ., : or ; character followed by a space or newline (thanks, @knokknok, #1249)
2017-03-11 13:42:19 +01:00
|
|
|
DEPENDS+= R-evaluate>=0.10:../../devel/R-evaluate
|
2019-07-31 22:46:05 +02:00
|
|
|
DEPENDS+= R-xfun>=0.8:../../devel/R-xfun
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
DEPENDS+= R-digest>=0.6.4:../../security/R-digest
|
|
|
|
DEPENDS+= R-formatR>=0.10:../../textproc/R-formatR
|
2019-07-31 22:46:05 +02:00
|
|
|
DEPENDS+= R-highr>=0.8:../../textproc/R-highr
|
|
|
|
DEPENDS+= R-markdown>=1.0:../../textproc/R-markdown
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
DEPENDS+= R-stringr>=0.6:../../textproc/R-stringr
|
2019-07-31 22:46:05 +02:00
|
|
|
DEPENDS+= R-yaml>=2.1.19:../../textproc/R-yaml
|
|
|
|
|
|
|
|
USE_LANGUAGES= # none
|
Initial import of knitr v1.6 as print/R-knitr.
This package provides a general-purpose tool for dynamic report
generation in R, which can be used to deal with any type of (plain
text) files, including Sweave, HTML, Markdown, reStructuredText,
AsciiDoc, and Textile. R code is evaluated as if it were copied and
pasted in an R terminal thanks to the evaluate package (e.g., we do
not need to explicitly print() plots from ggplot2 or lattice). R code
can be reformatted by the formatR package so that long lines are
automatically wrapped, with indent and spaces added, and comments
preserved. A simple caching mechanism is provided to cache results
from computations for the first time and the computations will be
skipped the next time. Almost all common graphics devices, including
those in base R and add-on packages like Cairo, cairoDevice and
tikzDevice, are built-in with this package and it is straightforward
to switch between devices without writing any special functions. The
width and height as well as alignment of plots in the output document
can be specified in chunk options (the size of plots for graphics
devices is also supported). Multiple plots can be recorded in a single
code chunk, and it is also allowed to rearrange plots to the end of a
chunk or just keep the last plot. Warnings, messages and errors are
written in the output document by default (can be turned off). The
language in code chunks is not restricted to R (there is simple
support to Python and shell scripts, etc). Many features are borrowed
from or inspired by Sweave, cacheSweave, pgfSweave, brew and decumar.
Note: this commit is part of reorganizing some of the recently
imported R packages, which are being reimported into more appropriate
categories (and removed from math) as a result of a recent discussion
on tech-pkg and privately with wiz@. See the thread starting with:
http://mail-index.netbsd.org/tech-pkg/2014/09/05/msg013558.html
2014-09-20 06:03:40 +02:00
|
|
|
|
|
|
|
REPLACE_RSCRIPT+= inst/bin/knit
|
|
|
|
REPLACE_RSCRIPT+= inst/examples/knit-all.R
|
|
|
|
|
|
|
|
REPLACE_INTERPRETER+= Rscript
|
|
|
|
REPLACE.Rscript.old= .*Rscript
|
|
|
|
REPLACE.Rscript.new= ${PREFIX}/bin/Rscript
|
|
|
|
REPLACE_FILES.Rscript= ${REPLACE_RSCRIPT}
|
|
|
|
|
|
|
|
.include "../../math/R/Makefile.extension"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|