The template which one can open via the RStudio GUI (file --> new --> R Markdown --> Advanced Word Document) will not knit. I did not alter the document template at all; if I use Ctrl + Shift + k
rmarkdown
throws an error:
Quitting from lines 73-74 (officedown-word-doc-template.Rmd)
Error: read_docx only support docx files
I just downloaded the package today using `install.packages("officedown") so it should be version 0.2.0 .
Here are the results of running sessionInfo()
:
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 digest_0.6.26 R6_2.4.1
[4] magrittr_1.5 officedown_0.2.0 evaluate_0.14
[7] zip_2.1.1 gdtools_0.2.2 rlang_0.4.8
[10] uuid_0.1-4 xml2_1.3.2 rmarkdown_2.4
[13] tools_4.0.3 officer_0.3.15.005 xfun_0.18
[16] yaml_2.2.1 compiler_4.0.3 systemfonts_0.3.2
[19] rvg_0.2.5 memoise_1.1.0 htmltools_0.5.0
[22] knitr_1.30
Any assistance would be greatly appreciated.
Thanks, could you provide also the result of getwd()
? Is there any blank space in it (as in "C:/blah blah")?
OK, I found the origin of the issue, it has been fixed in officer, not officedown. You will need to update officer from github until the new version is on CRAN:
remotes::install_github("davidgohel/officer")
Awesome! I installed the development versions of both officer and officedown, and knitting the example now works. Thank you !
I appreciate your help and the great packages you have written here.