Comments (6)
Hi, I think it is related to #38
I will fix it, thanks
from officedown.
This is solved now.
I did not know it was possible to have an R file instead of Rmd, thanks for that!
from officedown.
The filename problem appears to persist even with the latest R, rmarkdown, knitr, and (from github) officedown installed.
Given an .R script:
#' ---
#' output: officedown::rdocx_document
#' ---
mtcars
knitted from rstudio
I still receive the same error:
processing file: reprex-officedown.spin.Rmd
|....................... | 33%
ordinary text without R code
|............................................... | 67%
label: unnamed-chunk-1
|......................................................................| 100%
ordinary text without R code
output file: reprex-officedown.knit.md
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... call_post_knit_handler -> <Anonymous> -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file './reprex-officedown.spin.knit.md': No such file or directory
Execution halted
- Session info -----------------------------------------------------------------------------------
setting value
version R version 4.0.5 (2021-03-31)
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-05-17
- Packages ---------------------------------------------------------------------------------------
package * version date lib source
cachem 1.0.5 2021-05-15 [1] CRAN (R 4.0.4)
callr 3.7.0 2021-04-20 [1] CRAN (R 4.0.5)
cli 2.5.0 2021-04-26 [1] CRAN (R 4.0.5)
crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.3)
curl 4.3.1 2021-04-30 [1] CRAN (R 4.0.5)
desc 1.3.0 2021-03-05 [1] CRAN (R 4.0.4)
devtools 2.4.1 2021-05-05 [1] CRAN (R 4.0.5)
digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.0.5)
evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2)
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.0.3)
fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
gdtools 0.2.3 2021-01-06 [1] CRAN (R 4.0.3)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
highr 0.9 2021-04-16 [1] CRAN (R 4.0.5)
htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 4.0.3)
jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.0.3)
knitr 1.33 2021-04-24 [1] CRAN (R 4.0.5)
lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.5)
lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.4)
magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.3)
Matrix 1.3-2 2021-01-06 [2] CRAN (R 4.0.5)
memoise 2.0.0 2021-01-26 [1] CRAN (R 4.0.3)
officedown * 0.2.3.001 2021-05-17 [1] Github (davidgohel/officedown@f3be474)
officer * 0.3.18 2021-04-02 [1] CRAN (R 4.0.5)
pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.0.3)
pkgload 1.2.1 2021-04-06 [1] CRAN (R 4.0.5)
png 0.1-7 2013-12-03 [1] CRAN (R 4.0.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.2)
processx 3.5.2 2021-04-30 [1] CRAN (R 4.0.5)
ps 1.6.0 2021-02-28 [1] CRAN (R 4.0.4)
purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3)
rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.0.3)
Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.0.3)
remotes 2.3.0 2021-04-01 [1] CRAN (R 4.0.5)
reticulate 1.20 2021-05-03 [1] CRAN (R 4.0.5)
rlang 0.4.11 2021-04-30 [1] CRAN (R 4.0.5)
rmarkdown 2.8 2021-05-07 [1] CRAN (R 4.0.5)
rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.3)
rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.3)
rvg 0.2.5 2020-06-30 [1] CRAN (R 4.0.3)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
systemfonts 1.0.2 2021-05-11 [1] CRAN (R 4.0.5)
testthat 3.0.2 2021-02-14 [1] CRAN (R 4.0.4)
usethis 2.0.1 2021-02-10 [1] CRAN (R 4.0.3)
uuid 0.1-4 2020-02-26 [1] CRAN (R 4.0.3)
withr 2.4.2 2021-04-18 [1] CRAN (R 4.0.5)
xfun 0.23 2021-05-15 [1] CRAN (R 4.0.4)
xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.2)
yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2)
zip 2.1.1 2020-08-27 [1] CRAN (R 4.0.2)
from officedown.
Same issue when the source file is .md
. (I understand that rendering .md
files may be outside the scope of this package, but I just wanted to make you aware)
library(rmarkdown)
library(officedown)
writeLines(c("# Heading", "", "- item 1", "- item 2", ""), "test-file.md")
render("test-file.md", output_format = rdocx_document())
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file './test-file.knit.md': No such file or directory
from officedown.
It should be fixed now
from officedown.
@seankross your issue is also fixed (by the same solution)
from officedown.
Related Issues (20)
- Math font in rdocx_document HOT 1
- Add image to word doc header without using reference docx
- Error when using `knit_print_block` in loop HOT 6
- Header Problems concomitant with page numbering HOT 6
- Support {.unlisted .unnumbered} to exclude headings from table of contents HOT 2
- table caption style in yaml not used HOT 4
- insert section with page_margins, header and footer
- How to split long flextable in officedown powerpoint rmarkdown HOT 1
- landscape? HOT 1
- block_caption() in markdown corrups Word files HOT 5
- In-consistencies with the officeverse bookdown HOT 1
- layout='Content with Caption' not working HOT 2
- Header and footer from reference_docx not working with orientation switches.
- Knitting to word with hyperlink in footnote HOT 1
- Two column layout results in missing header and footer also affects Title and ToC.
- Applying a table style to a reference docx HOT 1
- Typo Readme HOT 2
- Non-reproducible code from the package example HOT 5
- Embedded fonts in reference document not carrying thru to output HOT 1
- Images in page headers of reference docx misplaced when using <!---BLOCK_LANDSCAPE_START---> <!---BLOCK_LANDSCAPE_STOP---> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officedown.