knitr

Miktex did not succeed after I updated R to version 3.5.0

China☆狼群 提交于 2020-05-23 09:34:33
问题 After I updated R to version 3.5.0, I couldn't start my MikTex from Rstudio, --- output: pdf_document: latex_engine: xelatex includes: in_header: header.tex keep_tex: yes --- Above is the code I typed ahead of my Rmd, and after knitring, Sorry, but D:\miktex\miktex\bin\x64\xelatex.exe did not succeed. The log file hopefully contains the information to get MiKTeX going again: C:/Users/DELL/AppData/Local/MiKTeX/2.9/miktex/log/xelatex.log Information showed in xelatex.log: 2018-04-29 10:06:17

How to include @font-face within style tag of RMarkdown?

血红的双手。 提交于 2020-05-17 05:46:32
问题 Is it possible to use the CSS @font-face to provide font files to an RMarkdown? e.g.: <style> @font-face { font-family: "Custom"; src: url(https://github.com/stevecondylios/fonts/raw/master/CircularStd-Book.ttf) format("truetype"); } body { font-family: "Custom", Verdana, Tahoma; } </style> Note that the exact same css code above (less the style tags) does work when it's stored in an external .css file locally and referenced in the Rmd's yaml with --- title: "My Rmarkdown doc" date: "28 April

How to include @font-face within style tag of RMarkdown?

末鹿安然 提交于 2020-05-17 05:45:15
问题 Is it possible to use the CSS @font-face to provide font files to an RMarkdown? e.g.: <style> @font-face { font-family: "Custom"; src: url(https://github.com/stevecondylios/fonts/raw/master/CircularStd-Book.ttf) format("truetype"); } body { font-family: "Custom", Verdana, Tahoma; } </style> Note that the exact same css code above (less the style tags) does work when it's stored in an external .css file locally and referenced in the Rmd's yaml with --- title: "My Rmarkdown doc" date: "28 April

Sudden collapse of kableExtra in [R]

北城以北 提交于 2020-05-15 08:05:41
问题 I should probably point out that I am still fairly new to working with RMarkdown and the kableExtra R package, but I have a document that was knitable last week and now no longer knits despite no physical changes to the document. The error message I receive is the following Error in save_kable_latex(x, file, latex_header_includes, keep_tex) : We hit an error when trying to use magick to read the generated PDF file. You may check your magick installation and try to use the magick::image_read

How can I install packages in knitr?

不想你离开。 提交于 2020-05-15 01:44:07
问题 Till now, I was using this chunk of code to load R packages and write .R files. But I am trying to use knitr rm (list=ls(all=TRUE)) kpacks <- c('ggplot2','install_github','devtools','mapdata') new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] if(length(new.packs)) install.packages(new.packs) lapply(kpacks, require, character.only=T) remove(kpacks, new.packs) options(max.print=5.5E5) But now, when I put this chunk of code in a Knitr document, I get this error: Error in

How can I install packages in knitr?

徘徊边缘 提交于 2020-05-15 01:42:30
问题 Till now, I was using this chunk of code to load R packages and write .R files. But I am trying to use knitr rm (list=ls(all=TRUE)) kpacks <- c('ggplot2','install_github','devtools','mapdata') new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] if(length(new.packs)) install.packages(new.packs) lapply(kpacks, require, character.only=T) remove(kpacks, new.packs) options(max.print=5.5E5) But now, when I put this chunk of code in a Knitr document, I get this error: Error in

How can I install packages in knitr?

一曲冷凌霜 提交于 2020-05-15 01:42:16
问题 Till now, I was using this chunk of code to load R packages and write .R files. But I am trying to use knitr rm (list=ls(all=TRUE)) kpacks <- c('ggplot2','install_github','devtools','mapdata') new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] if(length(new.packs)) install.packages(new.packs) lapply(kpacks, require, character.only=T) remove(kpacks, new.packs) options(max.print=5.5E5) But now, when I put this chunk of code in a Knitr document, I get this error: Error in

How can I install packages in knitr?

烈酒焚心 提交于 2020-05-15 01:42:09
问题 Till now, I was using this chunk of code to load R packages and write .R files. But I am trying to use knitr rm (list=ls(all=TRUE)) kpacks <- c('ggplot2','install_github','devtools','mapdata') new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] if(length(new.packs)) install.packages(new.packs) lapply(kpacks, require, character.only=T) remove(kpacks, new.packs) options(max.print=5.5E5) But now, when I put this chunk of code in a Knitr document, I get this error: Error in

How to add horizontal scroll bar for a ggplot plot in RMarkdown html

烈酒焚心 提交于 2020-05-14 18:28:11
问题 I have recently started using RMarkdown for reporting purposes. A specific report I am working on contains tables and plots for data acquired from many experiments carried out over the years - sort of updating and summarising data quickly. While I have found a way to add scrollbars/scroll boxes for tables (by using Kable) and code chunk outputs, I have not been able to add scrollbars for plots. Most of plots are not big and its not an issue, but for one/two plots there are many categories and

knitr chunk option eval=TRUE, echo=TRUE, include=FALSE

喜欢而已 提交于 2020-05-14 07:09:47
问题 I use RMarkdown and knitr for dynamic report generation. When knitting a document, I would like to have the code from an Rmarkdown chunk included in the knitted document and run the code -- but not show the output. That is, I would like to be able to do what this code suggests: eval=TRUE, echo=TRUE, include=FALSE ... and make knitr run the code ( eval = TRUE ), show the code ( echo = TRUE ), but not show the lengthy output (attempted with include = FALSE ), but my attempts fail. Does such an