我正在创建一个officedown
docx
文件,并且创建的文件处于只读模式。有没有办法让它处于兼容模式?
这是 Rmd 文件。
---
date: "`r Sys.Date()`"
author: "Your Name"
title: "officedown template"
output:
officedown::rdocx_document:
mapstyles:
Normal: ['First Paragraph']
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.cap = TRUE, fig.path = 'figures/test/')
library(officedown)
library(officer)
library(ggplot2)
fp <- fp_par(
text.align = "center",
padding.bottom = 20, padding.top = 120,
border.bottom = fp_border())
ft <- fp_text(shading.color='#EFEFEF', bold = TRUE)
```
\newpage
This document presents most of the features of the package `r ftext("officedown", ft)`.
`r fp`
## Table of content
<!---BLOCK_TOC--->
## List of figures
<!---BLOCK_TOC{seq_id: 'fig'}--->
## List of tables
<!---BLOCK_TOC{seq_id: 'tab'}--->
\newpage
## figures
### A boxplot
```{r plot, include=FALSE, dpi=300, fig.dim = c(10,7)}
ggplot(aes(x = factor(cyl), y = mpg), data = mtcars) +
geom_boxplot()
# ggsave(filename = 'plot.png',path = 'figures/test', plot = p, dpi = 300)
```
```{r, fig.cap="A boxplot", fig.id = "boxplot",dpi=300}
knitr::include_graphics('figures/test/plot-1.png')
```
输出文件信息截图
会话信息
- Session info ---------------------------------------------------------------------------------------------------
setting value
version R version 4.1.0 (2021-05-18)
os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United States.1252
ctype English_United States.1252
tz America/New_York
date 2021-06-08
- Packages -------------------------------------------------------------------------------------------------------
! package * version date lib source
P askpass 1.1 2019-01-13 [?] CRAN (R 4.1.0)
P assertthat 0.2.1 2019-03-21 [?] CRAN (R 4.1.0)
P backports 1.1.10 2020-09-15 [?] CRAN (R 4.1.0)
P cachem 1.0.5 2021-05-15 [?] CRAN (R 4.1.0)
P cli 2.5.0 2021-04-26 [?] CRAN (R 4.1.0)
P clipr 0.7.0 2019-07-23 [?] CRAN (R 4.1.0)
P colorspace 1.4-1 2019-03-18 [?] CRAN (R 4.1.0)
P crayon 1.4.1 2021-02-08 [?] CRAN (R 4.1.0)
P desc 1.2.0 2018-05-01 [?] CRAN (R 4.1.0)
P details 0.2.1 2020-01-12 [?] CRAN (R 4.1.0)
P digest 0.6.27 2020-10-24 [?] CRAN (R 4.1.0)
P dplyr 1.0.6 2021-05-05 [?] CRAN (R 4.1.0)
P ellipsis 0.3.2 2021-04-29 [?] CRAN (R 4.1.0)
P evaluate 0.14 2019-05-28 [?] CRAN (R 4.1.0)
P fansi 0.4.1 2020-01-08 [?] CRAN (R 4.1.0)
P farver 2.0.3 2020-01-16 [?] CRAN (R 4.1.0)
P fastmap 1.1.0 2021-01-25 [?] CRAN (R 4.1.0)
gdtools 0.2.3 2021-01-06 [1] standard (@0.2.3)
P generics 0.1.0 2020-10-31 [?] CRAN (R 4.1.0)
P ggplot2 * 3.3.3 2020-12-30 [?] CRAN (R 4.1.0)
ggtext 0.1.1 2020-12-17 [1] standard (@0.1.1)
P glue 1.4.2 2020-08-27 [?] CRAN (R 4.1.0)
gridtext 0.1.4 2020-12-10 [1] standard (@0.1.4)
P gtable 0.3.0 2019-03-25 [?] CRAN (R 4.1.0)
P here 0.1 2017-05-28 [?] CRAN (R 4.1.0)
htmltools 0.5.1.1 2021-01-22 [1] standard (@0.5.1.1)
P httr 1.4.2 2020-07-20 [?] CRAN (R 4.1.0)
P keyring 1.2.0 2021-04-28 [?] CRAN (R 4.1.0)
P knitr 1.30 2020-09-22 [?] CRAN (R 4.1.0)
P labeling 0.3 2014-08-23 [?] CRAN (R 4.1.0)
P lifecycle 1.0.0 2021-02-15 [?] CRAN (R 4.1.0)
P magrittr 2.0.1 2020-11-17 [?] standard (@2.0.1)
P memoise 2.0.0 2021-01-26 [?] CRAN (R 4.1.0)
P munsell 0.5.0 2018-06-12 [?] CRAN (R 4.1.0)
officedown * 0.2.2 2021-04-05 [1] standard (@0.2.2)
P officer * 0.3.19.004 2021-06-07 [?] Github (davidgohel/officer@5943a7d)
P openssl 1.4.3 2020-09-18 [?] CRAN (R 4.1.0)
pak 0.1.2.9001 2021-06-07 [1] local
P pillar 1.6.1 2021-05-16 [?] CRAN (R 4.1.0)
P pkgconfig 2.0.3 2019-09-22 [?] CRAN (R 4.1.0)
P png 0.1-7 2013-12-03 [?] CRAN (R 4.1.0)
P purrr 0.3.4 2020-04-17 [?] CRAN (R 4.1.0)
P R6 2.5.0 2020-10-28 [?] CRAN (R 4.1.0)
P Rcpp 1.0.5 2020-07-06 [?] CRAN (R 4.1.0)
renv 0.13.2 2021-03-30 [1] CRAN (R 4.1.0)
P rlang 0.4.11 2021-04-30 [?] CRAN (R 4.1.0)
P rmarkdown 2.5 2020-10-21 [?] CRAN (R 4.1.0)
P rprojroot 1.3-2 2018-01-03 [?] CRAN (R 4.1.0)
P rstudioapi 0.13 2020-11-12 [?] CRAN (R 4.1.0)
rvg 0.2.5 2020-06-30 [1] standard (@0.2.5)
P scales 1.1.1 2020-05-11 [?] CRAN (R 4.1.0)
P sessioninfo 1.1.1 2018-11-05 [?] CRAN (R 4.1.0)
systemfonts 1.0.2 2021-05-11 [1] standard (@1.0.2)
P tibble 3.1.2 2021-05-16 [?] CRAN (R 4.1.0)
P tidyr 1.1.3 2021-03-03 [?] CRAN (R 4.1.0)
P tidyselect 1.1.0 2020-05-11 [?] CRAN (R 4.1.0)
P utf8 1.2.1 2021-03-12 [?] CRAN (R 4.1.0)
P uuid 0.1-4 2020-02-26 [?] CRAN (R 4.1.0)
P vctrs 0.3.8 2021-04-29 [?] CRAN (R 4.1.0)
P withr 2.3.0 2020-09-22 [?] CRAN (R 4.1.0)
P xfun 0.18 2020-09-29 [?] CRAN (R 4.1.0)
P xml2 1.3.2 2020-04-23 [?] CRAN (R 4.1.0)
P yaml 2.2.1 2020-02-01 [?] CRAN (R 4.1.0)
P zip 2.1.0 2020-08-10 [?] CRAN (R 4.1.0)
[1] C:/Users/jonathan.sidi/AppData/Local/Temp/RtmpqMBfHk/renv-system-library
P -- Loaded and on-disk path mismatch.