r chunk
을 사용하여 내 Rmd에 css 파일을 추가하고 싶습니다. 그러나 예를html_document - css 파일의 출력 내에 r 청크 추가
---
title: "Untitled"
output:
html_document:
css: '`r system.file("shinydashboard.css" , package = "shinydashboard")`'
---
를 들어 내가 오류가있어 : 나는 모두와 관련된 질문 (this 및 this)를 읽을
pandoc: Could not fetch `r system.file(
`r system.file(: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
Execution halted
,하지만 r chunk
이 html_document
출력에 발생하는 경우가 상황을 커버하지 않았다 (Ramnathv이 brew
패키지를 언급하지만, 나는 '14 년에 게시 된 것 외에 그것을 테스트하지 않았다.).
RStudio에서 Knit
단추를 사용하는 것이 가능하면 좋을 것입니다.
감사합니다,
업데이트
내가 html_document
내 r chunk
를 사용하여 하나의 디렉토리에서 모든 .CSS 파일을 포함 할 때 또 한가지입니다. 여기에 내가 www
디렉토리에서 모든 파일을 포함 할 :
---
title: "Untitled"
output:
html_document:
css: "`r x <- list.files(path = 'www', pattern = '*.css', full.names = T); x <- paste(x, collapse = '\', \'');z <- paste0('[ \'', paste0(x, collapse = ', '), '\' ]'); z`"
---
'setup'R 청크에서'htmltools :: includeCSS (system.file ("shinydashboard.css", package = "shinydashboard")))'를 사용하면 작동하지 않습니까? –
작동하지 않습니다. 게다가'before_body'에 추가하고 싶은 html 파일이 있다면? – Nicolabo