-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46f8caa
commit e30c274
Showing
3 changed files
with
98 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,63 @@ | ||
Package: officer | ||
Type: Package | ||
Package: officer | ||
Title: Manipulation of Microsoft Word and PowerPoint Documents | ||
Version: 0.6.6.008 | ||
Version: 0.6.6.009 | ||
Authors@R: c( | ||
person("David", "Gohel", role = c("aut", "cre"), email = "[email protected]"), | ||
person("Stefan", "Moog", role = "aut", email = '[email protected]'), | ||
person(given = "ArData", role = "cph"), | ||
person("Frank", "Hangler", role = "ctb", email = "[email protected]", comment = "function body_replace_all_text"), | ||
person("Liz", "Sander", role = "ctb", email = '[email protected]', comment = "several documentation fixes"), | ||
person("Anton", "Victorson", role = "ctb", email = '[email protected]',comment = "fixes xml structures"), | ||
person("Jon", "Calder", role = "ctb", email = '[email protected]', comment = "update vignettes"), | ||
person("John", "Harrold", role = "ctb", email = '[email protected]', comment = "function annotate_base"), | ||
person("John", "Muschelli", role = "ctb", email = '[email protected]', comment = "google doc compatibility"), | ||
person("Bill", "Denney", email="[email protected]", role="ctb", comment=c(ORCID="0000-0002-5759-428X", "function as.matrix.rpptx")), | ||
person("Nikolai", "Beck", role = "ctb", email = '[email protected]', comment = "set speaker notes for .pptx documents"), | ||
person("Greg", "Leleu", role = "ctb", email = '[email protected]', comment = "fields functionality in ppt"), | ||
person("Hongyuan", "Jia", role = "ctb", email = "[email protected]", comment = c(ORCID = "0000-0002-0075-8183")) | ||
) | ||
Description: Access and manipulate 'Microsoft Word', 'RTF' and 'Microsoft PowerPoint' documents from R. | ||
The package focuses on tabular and graphical reporting from R; it also provides two functions | ||
that let users get document content into data objects. A set of functions | ||
lets add and remove images, tables and paragraphs of text in new or existing documents. | ||
The package does not require any installation of Microsoft products to be able to write Microsoft | ||
files. | ||
person("David", "Gohel", , "[email protected]", role = c("aut", "cre")), | ||
person("Stefan", "Moog", , "[email protected]", role = "aut"), | ||
person("ArData", role = "cph"), | ||
person("Frank", "Hangler", , "[email protected]", role = "ctb", | ||
comment = "function body_replace_all_text"), | ||
person("Liz", "Sander", , "[email protected]", role = "ctb", | ||
comment = "several documentation fixes"), | ||
person("Anton", "Victorson", , "[email protected]", role = "ctb", | ||
comment = "fixes xml structures"), | ||
person("Jon", "Calder", , "[email protected]", role = "ctb", | ||
comment = "update vignettes"), | ||
person("John", "Harrold", , "[email protected]", role = "ctb", | ||
comment = "function annotate_base"), | ||
person("John", "Muschelli", , "[email protected]", role = "ctb", | ||
comment = "google doc compatibility"), | ||
person("Bill", "Denney", , "[email protected]", role = "ctb", | ||
comment = c(ORCID = "0000-0002-5759-428X", "function as.matrix.rpptx")), | ||
person("Nikolai", "Beck", , "[email protected]", role = "ctb", | ||
comment = "set speaker notes for .pptx documents"), | ||
person("Greg", "Leleu", , "[email protected]", role = "ctb", | ||
comment = "fields functionality in ppt"), | ||
person("Hongyuan", "Jia", , "[email protected]", role = "ctb", | ||
comment = c(ORCID = "0000-0002-0075-8183")) | ||
) | ||
Description: Access and manipulate 'Microsoft Word', 'RTF' and 'Microsoft | ||
PowerPoint' documents from R. The package focuses on tabular and | ||
graphical reporting from R; it also provides two functions that let | ||
users get document content into data objects. A set of functions lets | ||
add and remove images, tables and paragraphs of text in new or | ||
existing documents. The package does not require any installation of | ||
Microsoft products to be able to write Microsoft files. | ||
License: MIT + file LICENSE | ||
URL: https://ardata-fr.github.io/officeverse/, | ||
https://davidgohel.github.io/officer/ | ||
BugReports: https://github.com/davidgohel/officer/discussions | ||
Imports: | ||
grDevices, stats, graphics, utils, | ||
zip (>= 2.1.0), | ||
graphics, | ||
grDevices, | ||
openssl, | ||
R6, | ||
ragg, | ||
stats, | ||
utils, | ||
uuid, | ||
xml2 (>= 1.1.0), | ||
openssl, R6, uuid, | ||
ragg | ||
URL: https://ardata-fr.github.io/officeverse/, https://davidgohel.github.io/officer/ | ||
zip (>= 2.1.0) | ||
Suggests: | ||
devEMF, | ||
doconv (>= 0.3.0), | ||
ggplot2, | ||
knitr, | ||
magick, | ||
rmarkdown, | ||
rsvg, | ||
testthat | ||
Encoding: UTF-8 | ||
BugReports: https://github.com/davidgohel/officer/discussions | ||
RoxygenNote: 7.3.1 | ||
Roxygen: list(markdown = TRUE) | ||
Suggests: testthat, devEMF, ggplot2, | ||
rmarkdown, | ||
doconv (>= 0.3.0), | ||
knitr, rsvg, magick | ||
RoxygenNote: 7.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: "Untitled" | ||
output: md_document | ||
params: | ||
rds_path: temp.RDS | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = FALSE) | ||
``` | ||
|
||
```{r tab.topcaption=FALSE, tab.cap.pre = "Tableau", tab.cap.sep = " :", tab.cap = "Coucou", label="plop", tab.cap.style = "Normal", tab.alt.title = "alt title", tab.alt.description = "alt description"} | ||
saveRDS( | ||
object = officer::opts_current_table(), | ||
params$rds_path | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
test_that("opts_current_table works as expected", { | ||
skip_if_not_installed("knitr") | ||
skip_if_not_installed("rmarkdown") | ||
skip_if_not(rmarkdown::pandoc_available()) | ||
|
||
new_dir <- tempfile() | ||
dir.create(new_dir, showWarnings = FALSE) | ||
rmd_fp <- file.path(new_dir, "knitr-utils.Rmd") | ||
generated_rds <- tempfile(fileext = ".RDS") | ||
file.copy("docs_dir/knitr-utils.Rmd", to = rmd_fp) | ||
rmarkdown::render( | ||
input = rmd_fp, | ||
envir = parent.frame(), | ||
params = list( | ||
rds_path = generated_rds | ||
), | ||
quiet = TRUE | ||
) | ||
x <- readRDS(generated_rds) | ||
expect_equal(x$cap.pre, "Tableau ") | ||
expect_equal(x$cap.style, "Normal") | ||
expect_equal(x$cap.sep, " : ") | ||
expect_equal(x$alt.title, "alt title") | ||
expect_equal(x$alt.description, "alt description") | ||
expect_equal(x$cap, "Coucou") | ||
}) |