Commit d30e79cd authored by Andreas Tille's avatar Andreas Tille

New upstream version 1.20

parent de5d7451
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.17
Date: 2017-08-09
Version: 1.20
Authors@R: c(
person("Yihui", "Xie", email = "xie@yihui.name", role = c("aut", "cre")),
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Adam", "Vogt", role = "ctb"),
person("Alastair", "Andrew", role = "ctb"),
person("Alex", "Zvoleff", role = "ctb"),
......@@ -15,10 +14,13 @@ Authors@R: c(
person("Ben", "Baumer", role = "ctb"),
person("Brian", "Diggs", role = "ctb"),
person("Cassio", "Pereira", role = "ctb"),
person("Christophe", "Dervieux", role = "ctb"),
person("David", "Hugh-Jones", role = "ctb"),
person("David", "Robinson", role = "ctb"),
person("Donald", "Arseneau", role = c("ctb", "cph"), comment = "the framed package at inst/misc/framed.sty"),
person("Doug", "Hemken", role = "ctb"),
person("Duncan", "Murdoch", role = "ctb"),
person("Elio", "Campitelli", role = "ctb"),
person("Fabian", "Hirschmann", role = "ctb"),
person("Fitch", "Simeon", role = "ctb"),
person("Forest", "Fang", role = "ctb"),
......@@ -37,6 +39,7 @@ Authors@R: c(
person("Jason", "Punyon", role = "ctb"),
person("Javier", "Luraschi", role = "ctb"),
person("Jeff", "Arnold", role = "ctb"),
person("Jenny", "Bryan", role = "ctb"),
person("Jeremy", "Ashkenas", role = c("ctb", "cph"), comment = "the CSS file at inst/misc/docco-classic.css"),
person("Jeremy", "Stephens", role = "ctb"),
person("Jim", "Hester", role = "ctb"),
......@@ -47,6 +50,7 @@ Authors@R: c(
person("Jonathan", "Keane", role = "ctb"),
person("JJ", "Allaire", role = "ctb"),
person("Johan", "Toloe", role = "ctb"),
person("Jonathan", "Sidi", role = "ctb"),
person("Joseph", "Larmarange", role = "ctb"),
person("Julien", "Barnier", role = "ctb"),
person("Kaiyin", "Zhong", role = "ctb"),
......@@ -55,17 +59,21 @@ Authors@R: c(
person(c("Kevin", "K."), "Smith", role = "ctb"),
person("Kirill", "Mueller", role = "ctb"),
person("Kohske", "Takahashi", role = "ctb"),
person("Martin", "Modrák", role = "ctb"),
person("Michael", "Chirico", role = "ctb"),
person("Michael", "Friendly", role = "ctb"),
person("Michal", "Bojanowski", role = "ctb"),
person("Michel", "Kuhlmann", role = "ctb"),
person("Nacho", "Caballero", role = "ctb"),
person("Nick", "Salkowski", role = "ctb"),
person("Noam", "Ross", role = "ctb"),
person("Obada", "Mahdi", role = "ctb"),
person("Qiang", "Li", role = "ctb"),
person("Ramnath", "Vaidyanathan", role = "ctb"),
person("Richard", "Cotton", role = "ctb"),
person("Robert", "Krzyzanowski", role = "ctb"),
person("Romain", "Francois", role = "ctb"),
person("Ruaridh", "Williamson", role = "ctb"),
person("Scott", "Kostyshak", role = "ctb"),
person("Sebastian", "Meyer", role = "ctb"),
person("Sietse", "Brouwer", role = "ctb"),
......@@ -86,14 +94,16 @@ Maintainer: Yihui Xie <xie@yihui.name>
Description: Provides a general-purpose tool for dynamic report generation in R
using Literate Programming techniques.
Depends: R (>= 3.1.0)
Imports: evaluate (>= 0.10), digest, highr, markdown, stringr (>= 0.6),
yaml, methods, tools
Suggests: formatR, testit, rgl (>= 0.95.1201), codetools, rmarkdown,
htmlwidgets (>= 0.7), webshot, tikzDevice (>= 0.10), png, jpeg,
XML, RCurl, DBI (>= 0.4-1), tibble
Imports: evaluate (>= 0.10), highr, markdown, stringr (>= 0.6), yaml,
methods, tools
Suggests: formatR, testit, digest, rgl (>= 0.95.1201), codetools,
rmarkdown, htmlwidgets (>= 0.7), webshot, tikzDevice (>= 0.10),
tinytex, xfun, reticulate (>= 1.4), JuliaCall (>= 0.11.1), png,
jpeg, xml2, httr, DBI (>= 0.4-1), showtext, tibble
License: GPL
URL: https://yihui.name/knitr/
BugReports: https://github.com/yihui/knitr/issues
Encoding: UTF-8
VignetteBuilder: knitr
SystemRequirements: Package vignettes based on R Markdown v2 or
reStructuredText require Pandoc (http://pandoc.org). The
......@@ -110,8 +120,8 @@ Collate: 'block.R' 'cache.R' 'utils.R' 'citation.R' 'hooks-html.R'
'utils-vignettes.R' 'zzz.R'
RoxygenNote: 6.0.1
NeedsCompilation: no
Packaged: 2017-08-09 06:32:13 UTC; yihui
Author: Yihui Xie [aut, cre],
Packaged: 2018-02-19 20:23:59 UTC; yihui
Author: Yihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>),
Adam Vogt [ctb],
Alastair Andrew [ctb],
Alex Zvoleff [ctb],
......@@ -123,10 +133,13 @@ Author: Yihui Xie [aut, cre],
Ben Baumer [ctb],
Brian Diggs [ctb],
Cassio Pereira [ctb],
Christophe Dervieux [ctb],
David Hugh-Jones [ctb],
David Robinson [ctb],
Donald Arseneau [ctb, cph] (the framed package at inst/misc/framed.sty),
Doug Hemken [ctb],
Duncan Murdoch [ctb],
Elio Campitelli [ctb],
Fabian Hirschmann [ctb],
Fitch Simeon [ctb],
Forest Fang [ctb],
......@@ -145,6 +158,7 @@ Author: Yihui Xie [aut, cre],
Jason Punyon [ctb],
Javier Luraschi [ctb],
Jeff Arnold [ctb],
Jenny Bryan [ctb],
Jeremy Ashkenas [ctb, cph] (the CSS file at
inst/misc/docco-classic.css),
Jeremy Stephens [ctb],
......@@ -156,6 +170,7 @@ Author: Yihui Xie [aut, cre],
Jonathan Keane [ctb],
JJ Allaire [ctb],
Johan Toloe [ctb],
Jonathan Sidi [ctb],
Joseph Larmarange [ctb],
Julien Barnier [ctb],
Kaiyin Zhong [ctb],
......@@ -164,17 +179,21 @@ Author: Yihui Xie [aut, cre],
Kevin K. Smith [ctb],
Kirill Mueller [ctb],
Kohske Takahashi [ctb],
Martin Modrák [ctb],
Michael Chirico [ctb],
Michael Friendly [ctb],
Michal Bojanowski [ctb],
Michel Kuhlmann [ctb],
Nacho Caballero [ctb],
Nick Salkowski [ctb],
Noam Ross [ctb],
Obada Mahdi [ctb],
Qiang Li [ctb],
Ramnath Vaidyanathan [ctb],
Richard Cotton [ctb],
Robert Krzyzanowski [ctb],
Romain Francois [ctb],
Ruaridh Williamson [ctb],
Scott Kostyshak [ctb],
Sebastian Meyer [ctb],
Sietse Brouwer [ctb],
......@@ -191,4 +210,4 @@ Author: Yihui Xie [aut, cre],
Wush Wu [ctb],
Zachary Foster [ctb]
Repository: CRAN
Date/Publication: 2017-08-10 04:27:37 UTC
Date/Publication: 2018-02-20 10:11:46 UTC
845d3d19b746e651b5dca5e946a25ce5 *DESCRIPTION
a3fa4a1d000f288c692f53a0b9d5d242 *NAMESPACE
7e83e53f3327da67ee3ff004319f947e *R/block.R
f0fcb430d1a6b04441d67fa8dbe38f0c *R/cache.R
dc5a1a5b1a03b5785c429d32b49239bf *R/citation.R
aa034a2a2837ed75b3e77cf634547db3 *DESCRIPTION
9d2e70c1bd8ab26c8d2ce5c71af5b7e3 *NAMESPACE
9455e9ed0fdba134b9db962698834331 *R/block.R
5e8d7c1512071be55f971ee5a4a09c3a *R/cache.R
85f1c377406571a184bba196ddee3dcf *R/citation.R
d3066cdaec8d60368dfa30093222ac88 *R/concordance.R
8c03e91e2de35561d1e64cdae5822c81 *R/defaults.R
945a192150631b47b5313e1b91d43282 *R/engine.R
44370920d24fd560ceeb3f5985c83215 *R/header.R
8b24e5522eb48c3be7fabd9a6796fb6e *R/defaults.R
5268d449557baf4772d05a249ec9040b *R/engine.R
f959328344ead19223c32d51e843eadd *R/header.R
e36c54d9b272ea1245ab8e0bcba9c8a1 *R/highlight.R
ef19e925acc44824076bc6eb2dfc50aa *R/hooks-asciidoc.R
ad8783b17b5906fc6c07f09f4d296f7b *R/hooks-chunk.R
2446ce11f32a4f1cca3afd6f76e3e8ab *R/hooks-extra.R
8ddff58339fb8b4ea5e80bee5f70c509 *R/hooks-extra.R
8bbf5874c36d9a1dc911d3e561b7d404 *R/hooks-html.R
afe0629d1804677a0badba586191c394 *R/hooks-latex.R
bd485d9274d1ac218876edd2b83371c5 *R/hooks-md.R
4270105c8e4ca39a1453a4e7f4e0295f *R/hooks-latex.R
91e6b80a4bcee781aabc66456be0c8f4 *R/hooks-md.R
7f13635b1aeb3df12f6a52e7c0faf79b *R/hooks-rst.R
55d62c24863e7bec5bc1520c619e43d0 *R/hooks-textile.R
65b656b97dc2114d331d2c717019ad97 *R/hooks.R
191a84c940aea13933a2ea770e22ff27 *R/output.R
4ab58caa9ae575b9e71304df938137d5 *R/hooks.R
a22fc8542cf2cbb5dea5e95d6780604e *R/output.R
3ed5019660a16d703e0ace6a3fab9b70 *R/package.R
9e91cd348c48c7a9f3fd516159ca2cbc *R/pandoc.R
bfffd7d37228dba6fc19745f53a7a608 *R/params.R
4cb07511c8cf0fb050c1a32abbc016ea *R/parser.R
3a172d7644851984a9e3a5ad5c37c173 *R/pattern.R
9392400f81c645c28164531b63bbf3ac *R/plot.R
d7c050d76dac22d51e77dc7368300315 *R/rocco.R
a2cc493deda216d4e29920b545cf004b *R/spin.R
7252a69cf3e746b1461c58fc7b80de2f *R/table.R
936a43bf96e691fc2bb6ea78622102cf *R/template.R
51466f630e071bf237103686ed8e75b8 *R/pandoc.R
0850625f3152a1efcf6c353e37c6ee50 *R/params.R
b9022f811d4acfc02db880e405a38b40 *R/parser.R
486089d3b39e2386b7f1bc36cdb7c42d *R/pattern.R
31da8802c4e946921dfba4df74eb4170 *R/plot.R
56c5c233303eb9febd8ecbc3cbde9b9d *R/rocco.R
a97d5df9c32b8304507b9b9788c1c270 *R/spin.R
153afb370e420ec30e95981162630499 *R/table.R
e80ce960bfdf675acdfe0d89218ee602 *R/template.R
c5804ad7464fae1634b6535c7761f40f *R/themes.R
cef5bab6cd92a77e0dbe91d5f8235098 *R/utils-base64.R
6e7a36364694065aabafa59420ddcae1 *R/utils-conversion.R
21a4d67efcc333f3dac7ef527de40850 *R/utils-rd2html.R
bccc67ce9e0580af504924ddb0878c30 *R/utils-sweave.R
f47ca439bfe38b2a60b1f28fcd865767 *R/utils-upload.R
1c4ef1ae1402062fdbee105cdd121d75 *R/utils-vignettes.R
605e11f123fbd91b619d4a307c15fde2 *R/utils.R
2fc8160fe3c570ecddb450bb36472eeb *R/utils-base64.R
57e8d91b07bbee950d4368d24209c5b2 *R/utils-conversion.R
b2e52eda83938d8777b7c452896a9033 *R/utils-rd2html.R
c2614a6ee9d138067e7751de09a2fe66 *R/utils-sweave.R
b590a458becc4cafe46f9c430211571a *R/utils-upload.R
0db1dc4f2339987deb97d3345a2adf91 *R/utils-vignettes.R
b7dcc84a3da5cc7fe0a9fe58b0348ce5 *R/utils.R
64580757ed828267f6976d73231f1f8f *R/zzz.R
90d78503e71aea0192a4d172d0580329 *README.md
c3352fb66d5984266d5977cff72984d9 *build/vignette.rds
8459b9212e981b320cf4aaeb3e2872be *README.md
2cdcdfc6d2064173b6ea2624d1e72b59 *build/vignette.rds
5320cec79c972798fe0eb5579eb51927 *demo/00Index
a0d48f6ce89f9e1d39ee7248ff8c5511 *demo/gwidgets.R
a95e58617a42ea5ea95fa99a10f1c120 *demo/notebook.R
......@@ -50,27 +50,27 @@ a70f6f982a3c3cc343b5db3f0bb90949 *inst/NEWS.Rd
b7813b1fe75cac6649448fab76bf1bae *inst/doc/datatables.html
294a1bced1cf56fc690cfe68db997784 *inst/doc/docco-classic.R
b47c340c4060c759ed158eeb0c258560 *inst/doc/docco-classic.Rmd
31b46c5c3f054dbb1d18bce8ac0c8e54 *inst/doc/docco-classic.html
895ad93dfa4a9650ef4d47d10c33a197 *inst/doc/docco-classic.html
65c936899dfbbb5ea725beb9e11f6463 *inst/doc/docco-linear.R
77224ea1f36284bfe5b3aa7c2576a0f1 *inst/doc/docco-linear.Rmd
fed8617270fbf76bae971052ab9b4bef *inst/doc/docco-linear.html
1494de871916640b28f97fd011cbc180 *inst/doc/docco-linear.html
d060cc6329c3b03347a61d5240cbb527 *inst/doc/knit_expand.R
45dec121925f328760fee414d1890168 *inst/doc/knit_expand.Rmd
efc90e5e7483a9c1fcf4bbb935f4f91f *inst/doc/knit_expand.html
f5d18ff2a7d9530d21ab95b1d1cbe091 *inst/doc/knit_expand.html
ae4efd7385455f0eb761f1e020687d06 *inst/doc/knit_print.R
ffede1c1f0749aaf92ddd8f9c30e6279 *inst/doc/knit_print.Rmd
624ec2a4ebd772acc06073757259eb66 *inst/doc/knit_print.html
1c2f6d64b22020bd8e7ba232f01b31c2 *inst/doc/knit_print.html
7c333d10e4255222789dda55dad958d8 *inst/doc/knitr-html.R
824b923dd4a500fb460a2366aabfb19c *inst/doc/knitr-html.Rhtml
8a8a2edbfa2ae3c06f8a335fd22d1c2e *inst/doc/knitr-html.html
668f1ab45d0deaae39315f0aa24f5010 *inst/doc/knitr-html.html
97b83b9e94f5690f0dcce82bda0eef48 *inst/doc/knitr-intro.R
c9c93ff46b0506f7facefc8de8edf09b *inst/doc/knitr-intro.Rmd
ee6e25f29578d11f0d405e842b71a97d *inst/doc/knitr-intro.html
058d3611cd2d47369848caa051db07fa *inst/doc/knitr-intro.html
aa3f1c19ae5b4ba70df72922f67996dc *inst/doc/knitr-markdown.R
3d047ff09d3b18b13466241cda178c57 *inst/doc/knitr-markdown.Rmd
6a367647811bebd5c7256ee3d6c69020 *inst/doc/knitr-markdown.html
724dd3e30b20b809696c58a4572b0872 *inst/doc/knitr-markdown.html
fe4f84807839f4ec0b3514718daec3fa *inst/doc/knitr-refcard.Rmd
bc310594118bad47987569c8a103e480 *inst/doc/knitr-refcard.pdf
291897dbd74a9c5c6e2b2a966739ecca *inst/doc/knitr-refcard.pdf
f16d37ed927336b920c67ce2e958ffc5 *inst/examples/README.md
80d81165446ea535b4368b5f6375d7a1 *inst/examples/Sweavel.sty
5cc86725bad53543ab7cc881a2783269 *inst/examples/child/knitr-child-a.Rnw
......@@ -219,79 +219,80 @@ c654ad3c4586084b795513343f0c8761 *inst/themes/xoria256.css
8bddde8d60970f665f04814529446c97 *inst/themes/zellner.css
7e4d9ef2703aa32dead65a39c2568fba *inst/themes/zenburn.css
c2abe08ea4638d3c157c8df34a621e47 *inst/themes/zmrok.css
85bf37075ac67751aec6d0112c2b6bfb *man/Sweave2knitr.Rd
4037e559cfc312993b5649e7a69e37f7 *man/all_labels.Rd
56d25a76fb1d9e60fbd8b0833d4c4452 *man/Sweave2knitr.Rd
14bf04f27ca22d3a954deface50df448 *man/all_labels.Rd
c70ef32aed9098ab4174db8d3dc7b79d *man/all_patterns.Rd
f4cbc18476d78f39d10abd3cad7d0b31 *man/asis_output.Rd
9384ab98cd071ea6aa0d47fb72dc50fb *man/chunk_hook.Rd
015941c86a3e6847de69f0c81d16ddcb *man/clean_cache.Rd
01be61faa96d9b3b501f0df21d61955b *man/combine_words.Rd
94922cc26c9e1697953375797a0c70d5 *man/current_input.Rd
a8a98995fb582e66efe4a2b168b5dbcc *man/dep_auto.Rd
9859878a0c29836090a732c000331e18 *man/asis_output.Rd
9134cf4216abcc534d0d4717a21475f5 *man/chunk_hook.Rd
cbfff2380163f4c2a6bbc0922e53e7b9 *man/clean_cache.Rd
9bd15469c977cdb06a885b566041b85f *man/combine_words.Rd
3dee5c437d1d13266ec49f3673fdf704 *man/current_input.Rd
4089e143f53d3843ded53eece7d40b73 *man/dep_auto.Rd
15516b8f520f77e7a7c42c0c518ea36f *man/dep_prev.Rd
46a7609c4a60baea99aa06135e529556 *man/engine_output.Rd
75a320584697b346ad67e49de6c169e8 *man/fig_chunk.Rd
cee6314aa08941e3cb43ea0904a96683 *man/fig_path.Rd
67f1ab2bab47487835f8152032197e24 *man/hook_animation.Rd
42d04669982d9f64b13bb2cbe7b2eabd *man/hook_document.Rd
b715a18aca544ac04c718f1e36d0e145 *man/hook_plot.Rd
cb7738e71493e1dfe914037e99cbe0f8 *man/image_uri.Rd
653bcaec0b9c6e61a3dc057ecc47e31c *man/imgur_upload.Rd
b5972cb99b6519ba5341a77c3a4dcb12 *man/include_graphics.Rd
ffed3a6ceeba9c3a9236934284a539ee *man/include_url.Rd
50f0c7fd03568f44b17adce8f4081e44 *man/inline_expr.Rd
e8969d529f26e941652b8d0e97fdbbcd *man/kable.Rd
5736d0c9b49ff4d545c8b2750e0ef84e *man/knit.Rd
817971db6d1f486cf5acfe0bf421a2ed *man/knit2html.Rd
db8d6ed9c6d25b99f5a0811634ff9a04 *man/knit2pandoc.Rd
0c086cf0e0157358d99f25b191f4dd79 *man/knit2pdf.Rd
a38c5309f12f83264004224e450c65d7 *man/knit2wp.Rd
8478bea3c82993815ed02462995275f2 *man/knit_child.Rd
d8a42f80cc1a14f311ff7021951c4d1b *man/knit_engines.Rd
7e84807c362edb115506b966154b85f6 *man/knit_exit.Rd
26f7d716f1c9e44897dba04ecd075ed2 *man/knit_expand.Rd
a1c2b3ecfad5f8906706feec6ccf82e8 *man/knit_filter.Rd
73d44ea427ddebf742bc8ac73ff014be *man/engine_output.Rd
fc81570acbdda941dd826106425ea169 *man/fig_chunk.Rd
179291efb7710a81573c18a6b940a4a2 *man/fig_path.Rd
169619f08d9cf17195b68ec747bd627d *man/hook_animation.Rd
22f3d921c032294cb90cd78961ebdb94 *man/hook_document.Rd
cb308199c822d4a9ece7cd91f4890db5 *man/hook_plot.Rd
7be3cebf5e5ff6a3e2a643bdfe550be0 *man/image_uri.Rd
a101a6d30acc43b6c05e483f42f7ba6e *man/imgur_upload.Rd
d31b552d1b1c76c22d7f63b59fe914ee *man/include_graphics.Rd
0608d288357ff740bbfd0e7be24d41ba *man/include_url.Rd
339b19fe49695c2640a3876542a13142 *man/inline_expr.Rd
d508fb51081c3dc18d8910f46feadc9f *man/kable.Rd
21e3dc1e4081549b6d438052c3f04468 *man/knit.Rd
7e22ef3f6fbdf210b51f8c3bf73e0da1 *man/knit2html.Rd
4738fc32f0a6b688c583870650cb71cf *man/knit2pandoc.Rd
bd22d6fc2213b518f56769dcc8f6f583 *man/knit2pdf.Rd
078774c10380a3c99a7efd3c2e714ef0 *man/knit2wp.Rd
a6d8bb0d14cc903dea44a1368e4213ea *man/knit_child.Rd
6b55b643f0387d438a28a9c2d954dfbd *man/knit_engines.Rd
9c461debed03e8f272772fb0d830b993 *man/knit_exit.Rd
b9f9a0a376ba11149d61a7d917128cbf *man/knit_expand.Rd
17a913b82a6ee058be978b81a552b8d8 *man/knit_filter.Rd
4728d146be77e9f68d28b8b668b988d8 *man/knit_global.Rd
dd4f073de212607fc460a047fca8f931 *man/knit_hooks.Rd
e86dde49756b935cbda48e42fe89daa5 *man/knit_meta.Rd
3b9fbc1a85b4eeac2eea40009dcf4c75 *man/knit_params.Rd
fa9537ba9a1abfe3842901a5bc0243be *man/knit_params_yaml.Rd
21b7c1c512ab1e78a016da578d468ee2 *man/knit_patterns.Rd
aeed7a9103ff051b19e0e07bf72f2ccc *man/knit_print.Rd
08d949f26250ce2941b63d2fdf746b07 *man/knit_rd.Rd
211e8b8f5d9c584e04591a8e9c8b8d5b *man/knit_hooks.Rd
b2d78a6ff6ce8a7e7f9eb936617113af *man/knit_meta.Rd
3faa957f12dff93a25aec26ed67092e2 *man/knit_params.Rd
f7bce4fc3089f38ff25c7bb1fdc64103 *man/knit_params_yaml.Rd
75b9d3bef5989572feae37b800f8ebf2 *man/knit_patterns.Rd
d3154918be991ca3c5249d34cd2298a7 *man/knit_print.Rd
99f46046459d8b2a7dafa95e807212d8 *man/knit_rd.Rd
08152afd6ff33447d2b62f612e510dda *man/knit_theme.Rd
d97a05fd634906ca6db3907730b6af2c *man/knit_watch.Rd
ab6fc290e2abcd38db22c0952c13aeec *man/knit_watch.Rd
f09e2f51d347626d01b54b3edf9c5eea *man/knitr-package.Rd
50c9a6e8a3ae0c6677834a49a5edb1fe *man/load_cache.Rd
9c813049e0b3ce7c16beb8c8cb6f5841 *man/opts_chunk.Rd
2c29817a7597f03790be784f9dce6643 *man/opts_hooks.Rd
7afb8030821b3d3d16ad83c5344f2c04 *man/opts_knit.Rd
ac9556af5aa2c75bfddea413fb43c216 *man/opts_template.Rd
369d9c766dbc92a70f2402ae045e2859 *man/output_hooks.Rd
f85128058055dd56a31ca5351820d47f *man/pandoc.Rd
9691ac6f3e2557c035510c1d9b95da0b *man/load_cache.Rd
ccc501958ca44619a9c392746b56e5fa *man/opts_chunk.Rd
de23f365059434fcdd4aeb591d3386c2 *man/opts_hooks.Rd
71effb0ea9c15156fa2becb3981c60db *man/opts_knit.Rd
2af2b65d4abe1d2bf540ba2e17f00375 *man/opts_template.Rd
3306bf8e7e7efc7f2feee5a116baf031 *man/output_hooks.Rd
3f2f30f826b20af7469068479be40fe9 *man/output_type.Rd
bc39ab83177f66efe6da1cfea4498d72 *man/pandoc.Rd
1fcc7272717b8080bad4391e05eeb041 *man/pat_fun.Rd
5a6d4160656b24f541e362abd65beb98 *man/plot_crop.Rd
a5428ea44f54e284f6fcdf80e94d1beb *man/plot_crop.Rd
ecdeff784f0a76d326d97a5b54ed978d *man/rand_seed.Rd
047c5be288fd5e6383e21b726708421a *man/raw_output.Rd
098f3a94d0fd1d491c5c959a3646ffb1 *man/read_chunk.Rd
47320f8c695df0135f6bbc9c1f3956a4 *man/read_rforge.Rd
405d7ee7c1c2ee2ef1aca2bad34af4d5 *man/rocco.Rd
7064545a037cb7665ac9a35b8d1473cf *man/rst2pdf.Rd
976d651d51c7eae92aa83a0ca96cbffe *man/set_alias.Rd
dad9e87bb6ef74c522917c31b447965e *man/set_header.Rd
0f322e31eafdc2b3b84354d48c5c60ba *man/set_parent.Rd
344917834dce42e47e4d6a12d520229a *man/spin.Rd
0c017a8154e6550e716d3482c73a83fb *man/spin_child.Rd
5ac08f7039ddf1e57d439b286f489811 *man/stitch.Rd
95b9e03619feb2645252eb606f306975 *man/raw_output.Rd
d701b6b61e869a87ff14f3a4c77f2dde *man/read_chunk.Rd
daef4bc697911d95d764a21244d746fe *man/read_rforge.Rd
fd5aa071515c6475c40e546e6c3555fb *man/rocco.Rd
4c425df2766facb4d55fe47f3e46322a *man/rst2pdf.Rd
3695a685eb7c349e0706982088ee9145 *man/set_alias.Rd
18c2e647c5a8746c7d5a2dbe0131254d *man/set_header.Rd
bb9e7e0e33839acc5e7ccb2ac972e801 *man/set_parent.Rd
726cfce64f1ed47c059e719353bb02f1 *man/spin.Rd
a302e6837904fefe1e6daa53c38df637 *man/spin_child.Rd
57e9301f832fcb6e04f20992c58f489b *man/stitch.Rd
ed2cb9b4fc4d4e148f5d6c0c9d12fda2 *man/vignette_engines.Rd
c22f300bc6f80990a09961f3e8822865 *man/wrap_rmd.Rd
4d837cf09e8df85d7784e4cd4e6b392a *man/write_bib.Rd
6e89223cbccc5ee17cdc93070b25157e *man/wrap_rmd.Rd
4242d4b211a74a5fe7b60ae20db8f4a3 *man/write_bib.Rd
c9999baf2feaa9582fff2870c8a3260d *tests/run-all.R
29b3efe2fa7fd7537cd0b03c0e0c41e7 *tests/testit/knit-envir.Rmd
409a303e08ceca7233025326046382a3 *tests/testit/knit-tikzDevice.Rnw
35389910ee6b641a0e0b81e6f009159e *tests/testit/test-cache.R
621fafe6a1a958b26529fc59594bcff9 *tests/testit/test-citation.R
a9cc8363a0b6814942d112f2929af9e8 *tests/testit/test-closure.R
ba9e0aebd2d9410a5178456e7d2c68d1 *tests/testit/test-closure.R
f2dc0de6ec9d0c4159c4d2673301d4da *tests/testit/test-envir.R
54603a29c261bcb6ad6e7829d2a9f3d5 *tests/testit/test-hooks.R
97c09bd4a41b10ad75f2f35ef5e67c96 *tests/testit/test-output.R
......@@ -300,7 +301,7 @@ ec39f565dfeab550713a42c09d8bf9d5 *tests/testit/test-parser.R
c341b0087b68840dd269fa23a420d109 *tests/testit/test-patterns.R
92be2734ab25fa414faca4785f8a6790 *tests/testit/test-plot.R
233af33c6f30c6966d2fceaf0809e22a *tests/testit/test-sql.R
189a16b4ee801870559e29981e3930a0 *tests/testit/test-table.R
589b52d28267fbaa88ce7d2e9c75fc0a *tests/testit/test-table.R
f7d3197f8f2938e0fef97a1468aed580 *tests/testit/test-templates.R
fda998ba31972d537021ac81fc02f404 *tests/testit/test-utils.R
8e74c48d61c148b17890065ce21f60f3 *tools/covr.R
......
......@@ -56,6 +56,8 @@ export(include_app)
export(include_graphics)
export(include_url)
export(inline_expr)
export(is_html_output)
export(is_latex_output)
export(kable)
export(knit)
export(knit2html)
......
......@@ -65,7 +65,7 @@ call_block = function(block) {
if (params$engine == 'R' && isFALSE(params$cache.comments)) {
content[['code']] = parse_only(content[['code']])
}
hash = paste(valid_path(params$cache.path, label), digest::digest(content), sep = '_')
hash = paste(valid_path(params$cache.path, label), digest(content), sep = '_')
params$hash = hash
if (cache$exists(hash, params$cache.lazy) &&
isFALSE(params$cache.rebuild) &&
......@@ -104,6 +104,7 @@ block_exec = function(options) {
res.before = run_hooks(before = TRUE, options)
engine = get_engine(options$engine)
output = in_dir(input_dir(), engine(options))
if (is.list(output)) output = unlist(output)
res.after = run_hooks(before = FALSE, options)
output = paste(c(res.before, output, res.after), collapse = '')
output = knit_hooks$get('chunk')(output, options)
......@@ -421,7 +422,10 @@ call_inline = function(block) {
in_dir(input_dir(), inline_exec(block))
}
inline_exec = function(block, envir = knit_global(), hook = knit_hooks$get('inline')) {
inline_exec = function(
block, envir = knit_global(), hook = knit_hooks$get('inline'),
hook_eval = knit_hooks$get('evaluate.inline')
) {
# run inline code and substitute original texts
code = block$code; input = block$input
......@@ -429,8 +433,7 @@ inline_exec = function(block, envir = knit_global(), hook = knit_hooks$get('inli
loc = block$location
for (i in 1:n) {
v = withVisible(eval(parse_only(code[i]), envir = envir))
res = if (v$visible) knit_print(v$value, inline = TRUE, options = opts_chunk$get())
res = hook_eval(code[i], envir)
if (inherits(res, 'knit_asis')) res = wrap(res, inline = TRUE)
d = nchar(input)
# replace with evaluated results
......
......@@ -141,7 +141,7 @@ cache_rx = '_[abcdef0123456789]{32}[.](rdb|rdx|RData)$'
#' object names in these files to automatically build cache dependencies, which
#' is similar to the effect of the \code{dependson} option. It is supposed to be
#' used in the first chunk of a document and this chunk must not be cached.
#' @param path the path to the dependency file
#' @param path Path to the dependency file.
#' @return \code{NULL}. The dependencies are built as a side effect.
#' @note Be cautious about \code{path}: because this function is used in a
#' chunk, the working directory when the chunk is evaluated is the directory
......@@ -196,15 +196,15 @@ parse_objects = function(path) {
#' chunk, which is normally not possible because \pkg{knitr} compiles the
#' document in a linear fashion, and objects created later cannot be used before
#' they are created.
#' @param label the chunk label of the code chunk that has a cache database
#' @param object the name of the object to be fetched from the database (if
#' missing, \code{NULL} is returned)
#' @param notfound a value to use when the \code{object} cannot be found
#' @param path the path of the cache database (normally set in the global chunk
#' option \code{cache.path})
#' @param lazy whether to \code{\link{lazyLoad}} the cache database (depending
#' @param label The chunk label of the code chunk that has a cache database.
#' @param object The name of the object to be fetched from the database. If it is
#' missing, \code{NULL} is returned).
#' @param notfound A value to use when the \code{object} cannot be found.
#' @param path Path of the cache database (normally set in the global chunk
#' option \code{cache.path}).
#' @param lazy Whether to \code{\link{lazyLoad}} the cache database (depending
#' on the chunk option \code{cache.lazy = TRUE} or \code{FALSE} of that code
#' chunk)
#' chunk).
#' @note Apparently this function loads the value of the object from the
#' \emph{previous} run of the document, which may be problematic when the
#' value of the object becomes different the next time the document is
......@@ -284,8 +284,8 @@ rand_seed = quote({
#' will not be automatically cleaned. You can use this function to identify
#' these possible files, and clean them if you are sure they are no longer
#' needed.
#' @param clean whether to remove the files
#' @param path the cache path
#' @param clean Boolean; whether to remove the files.
#' @param path Path to the cache.
#' @note The identification is not guaranteed to be correct, especially when
#' multiple documents share the same cache directory. You are recommended to
#' call \code{clean_cache(FALSE)} and carefully check the list of files (if
......
......@@ -17,18 +17,18 @@
#' often, so it is not a lot of work even if you just cut and paste such
#' bibliography entries from \code{toBibtex(citation())}.
#'
#' @param x package names (packages which are not installed are ignored)
#' @param file the (\file{.bib}) file to write (by default writes to the R
#' console; ignored if it is \code{NULL})
#' @param tweak whether to fix some known problems in the citations, especially
#' non-standard format of authors
#' @param width the width of lines in bibliographyb entries (if \code{NULL},
#' lines will not be wrapped)
#' @param prefix a prefix string for keys in BibTeX entries; by default, it is
#' @param x Package names. Packages which are not installed are ignored.
#' @param file The (\file{.bib}) file to write. By default, or if \code{NULL},
#' output is written to the R console.
#' @param tweak Whether to fix some known problems in the citations, especially
#' non-standard format of author names.
#' @param width Width of lines in bibliography entries. If \code{NULL},
#' lines will not be wrapped.
#' @param prefix Prefix string for keys in BibTeX entries; by default, it is
#' \samp{R-} unless \code{\link{option}('knitr.bib.prefix')} has been set to
#' another string
#' @return a list containing the citations (also written to the \code{file} as a
#' side effect)
#' another string.
#' @return A list containing the citations. Citations are also written to the \code{file} as a
#' side effect.
#' @note Some packages on CRAN do not have standard bib entries, which was once
#' reported by Michael Friendly at
#' \url{https://stat.ethz.ch/pipermail/r-devel/2010-November/058977.html}. I
......@@ -106,7 +106,7 @@ write_bib = function(
.tweak.bib = local({
x = read.csv(inst_dir('misc/tweak_bib.csv'), stringsAsFactors = FALSE)
x = x[order(xtfrm(x$package)), , drop = FALSE] # reorder entries by package names
write.csv(x, inst_dir('misc/tweak_bib.csv'), row.names = FALSE)
try_silent(write.csv(x, inst_dir('misc/tweak_bib.csv'), row.names = FALSE))
setNames(
lapply(x$author, function(a) c(author = sprintf(' author = {%s},', a))),
x$package
......
......@@ -11,18 +11,28 @@ new_defaults = function(value = list()) {
}
}
}
set = function(...) {
resolve = function(...) {
dots = list(...)
if (length(dots) == 0) return()
if (is.null(names(dots)) && length(dots) == 1 && is.list(dots[[1]]))
if (length(dots <- dots[[1]]) == 0) return()
defaults <<- merge(dots)
dots
}
set = function(...) {
dots = resolve(...)
if (length(dots)) defaults <<- merge(dots)
invisible(NULL)
}
merge = function(values) merge_list(defaults, values)
restore = function(target = value) defaults <<- target
append = function(...) {
dots = resolve(...)
for (i in names(dots)) dots[[i]] <- c(defaults[[i]], dots[[i]])
if (length(dots)) defaults <<- merge(dots)
invisible(NULL)
}
list(get = get, set = set, merge = merge, restore = restore)
list(get = get, set = set, append = append, merge = merge, restore = restore)
}
#' Default and current chunk options
......@@ -108,9 +118,9 @@ opts_chunk_attr = local({
#' We do not have to use the chunk option names given in \pkg{knitr}; we can set
#' aliases for them. The aliases are a named character vector; the names are
#' aliases and the elements in this vector are the real option names.
#' @param ... named arguments (argument names are aliases, and argument values
#' are real chunk options)
#' @return NULL (\code{opts_knit$get('aliases')} is modified as the side effect)
#' @param ... Named arguments. Argument names are aliases, and argument values
#' are real option names.
#' @return \code{NULL}. \code{opts_knit$get('aliases')} is modified as the side effect.
#' @export
#' @examples set_alias(w = 'fig.width', h = 'fig.height')
#' # then we can use options w and h in chunk headers instead of fig.width and fig.height
......
......@@ -35,18 +35,32 @@ knit_engines = new_defaults()
#'
#' If you have designed a language engine, you may call this function in the end
#' to format and return the text output from your engine.
#' @param options a list of chunk options (usually this is just the object
#'
#' For expert users, an advanced usage of this function is
#' \code{engine_output(options, out = LIST)} where \code{LIST} is a list that
#' has the same structure as the output of \code{evaluate::evaluate()}. In this
#' case, the arguments \code{code} and \code{extra} are ignored, and the list is
#' passed to an internal function \code{knitr:::wrap()} to return a character
#' vector of final output.
#' @param options A list of chunk options. Usually this is just the object
#' \code{options} passed to the engine function; see
#' \code{\link{knit_engines}})
#' @param code the source code of the chunk, to which the output hook
#' \code{source} is applied, unless the chunk option \code{echo == FALSE}
#' @param out the text output from the engine, to which the hook \code{output}
#' is applied, unless the chunk option \code{results == 'hide'}
#' @param extra any additional text output that you want to include
#' \code{\link{knit_engines}}.
#' @param code Source code of the chunk, to which the output hook
#' \code{source} is applied, unless the chunk option \code{echo} is \code{FALSE}.
#' @param out Text output from the engine, to which the hook \code{output}
#' is applied, unless the chunk option \code{results} is \code{'hide'}
#' @param extra Any additional text output that you want to include.
#' @return A character string generated from the source code and output using
#' the appropriate output hooks.
#' @export
#' @examples library(knitr)
#' engine_output(opts_chunk$merge(list(engine = 'Rscript')), code = '1 + 1', out = '[1] 2')
#' engine_output(opts_chunk$merge(list(echo = FALSE, engine = 'Rscript')), code = '1 + 1', out = '[1] 2')
#'
#' # expert use only
#' engine_output(opts_chunk$merge(list(engine = 'python')), out = list(structure(list(src = '1 + 1'), class = 'source'), '2'))
engine_output = function(options, code, out, extra = NULL) {
if (missing(code) && is.list(out)) return(unlist(wrap(out, options)))
if (!is.logical(options$echo)) code = code[options$echo]
if (length(code) != 1L) code = paste(code, collapse = '\n')
if (options$engine == 'sas' && length(out) > 1L && !grepl('[[:alnum:]]', out[2]))
......@@ -72,9 +86,7 @@ engine_output = function(options, code, out, extra = NULL) {
), collapse = '\n')
}
## TODO: how to emulate the console?? e.g. for Python
# see some experiments at https://github.com/yihui/runr
## command-line tools
eng_interpreted = function(options) {
engine = options$engine
code = if (engine %in% c('highlight', 'Rscript', 'sas', 'haskell', 'stata')) {
......@@ -106,7 +118,7 @@ eng_interpreted = function(options) {
f
)
} else paste(switch(
engine, bash = '-c', coffee = '-e', groovy = '-e', lein = 'exec -e',
engine, bash = '-c', coffee = '-e', groovy = '-e', lein = 'exec -ep',
mysql = '-e', node = '-e', octave = '--eval', perl = '-e', psql = '-c',
python = '-c', ruby = '-e', scala = '-e', sh = '-c', zsh = '-c', NULL
), shQuote(paste(options$code, collapse = '\n')))
......@@ -152,6 +164,20 @@ eng_shlib = function(options) {
engine_output(options, options$code, out)
}
## Python
eng_python = function(options) {
if (isFALSE(options$python.reticulate)) {
eng_interpreted(options)
} else {
if (!loadable('reticulate')) warning2(
"The 'python' engine in knitr requires the reticulate package. ",
"If you do not want to use the reticulate package, set the chunk option ",
"python.reticulate = FALSE."
)
reticulate::eng_python(options)
}
}
## Java
# e.g. see http://cran.rstudio.com/package=jvmr
......@@ -182,6 +208,11 @@ eng_Rcpp = function(options) {
engine_output(options, code, '')
}
## Julia
eng_julia = function(options) {
JuliaCall::eng_juliacall(options)
}
## Stan
## Compiles Stan model in the code chunk, creates a stanmodel object,
## and assigns it to a variable with the name given in engine.opts$x.
......@@ -348,7 +379,7 @@ eng_block = function(options) {
# convert the chunk content to HTML or LaTeX (ideally I only need to specify
# the markdown extension, but it is not implemented yet for LaTeX:
# https://github.com/jgm/pandoc/issues/2453)
if (is_pandoc) code = pandoc_fragment(code, to)
if (is_pandoc) code = pandoc_fragment(code, if (to == 'html') 'html4' else to)
l1 = options$latex.options
if (is.null(l1)) l1 = ''
h2 = options$html.tag %n% 'div'
......@@ -590,7 +621,7 @@ eng_go = function(options) {
local({
for (i in c(
'awk', 'bash', 'coffee', 'gawk', 'groovy', 'haskell', 'lein', 'mysql',
'node', 'octave', 'perl', 'psql', 'python', 'Rscript', 'ruby', 'sas',
'node', 'octave', 'perl', 'psql', 'Rscript', 'ruby', 'sas',
'scala', 'sed', 'sh', 'stata', 'zsh'
)) knit_engines$set(setNames(list(eng_interpreted), i))
})
......@@ -600,7 +631,8 @@ knit_engines$set(
highlight = eng_highlight, Rcpp = eng_Rcpp, tikz = eng_tikz, dot = eng_dot,
c = eng_shlib, fortran = eng_shlib, fortran95 = eng_shlib, asy = eng_dot,
cat = eng_cat, asis = eng_asis, stan = eng_stan, block = eng_block,
block2 = eng_block2, js = eng_js, css = eng_css, sql = eng_sql, go = eng_go
block2 = eng_block2, js = eng_js, css = eng_css, sql = eng_sql, go = eng_go,
python = eng_python, julia = eng_julia
)
get_engine = function(name) {
......
......@@ -94,11 +94,11 @@ insert_header_html = function(doc, b) {
#' type of output. For instance, we can change \code{highlight} to LaTeX
#' definitions of the \pkg{listings} package (and modify the output hooks
#' accordingly), so we can decorate R code using the \pkg{listings} package.
#' @param ... the header components; currently possible components are
#' @param ... Header components; currently possible components are
#' \code{highlight}, \code{tikz} and \code{framed}, which contain the
#' necessary commands to be used in the HTML header or LaTeX preamble; note
#' HTML output does not use the \code{tikz} and \code{framed} components (they
#' do not make sense to HTML)
#' necessary commands to be used in the HTML header or LaTeX preamble. Note that
#' HTML output does not use the \code{tikz} and \code{framed} components, since
#' they do not make sense in the context of HTML.
#' @return The header vector in \code{opts_knit} is set.
#' @export
#' @examples set_header(tikz = '\\usepackage{tikz}')
......