[英]Encrypted R Markdown HTML file not displaying graphs?
我正在嘗試加密使用 RMarkdown 創建的 HTML 文件。 我正在使用encryptedRmd
package。
對於 markdown 文檔,我有:
title: "My_Markdown"
output:
html_document:
toc: true
toc_float: true
toc_depth: 2
self_contained: yes
#ggplots below
並且,將此 markdown 轉換為加密版本:
library(encryptedRmd)
path = '//R_Scripts/My_Markdown.html'
encrypt_html_file(
path,
output_path = paste0(path, ".enc.html")
)
加密有效,我可以訪問新的加密 HTML。 但是,加密版本中沒有顯示任何 ggplot,目錄也沒有顯示。 帶有數據的表格確實出現了。 test.html 文檔出現了ggplots,所以我想知道為什么它沒有翻譯成加密版本?
我沒有聽說過 encryptRmd package,但看起來很有趣。 在創建.Rmd 時,如果在 yaml 中使用self_contained: yes
會怎樣? 這將使整個文檔成為獨立的,希望它對您有好的結果
output:
html_document:
self_contained: yes
我只是嘗試了兩種方式,我能夠讓 ggplot2 以兩種方式顯示。
encrypt_html_file("//R_Scripts/test.html", "//R_Scripts/test_enc.html"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.