【发布时间】:2020-07-22 23:28:27
【问题描述】:
我有这个来自 Rmarkdown 的 html knit 输出,但由于它很重(它是一个在线指南),打开链接时页面需要很长时间才能显示出来。我试图将 rmd 文件分成不同的 rms 子文件,如下所示,但我仍然无法得到结果。谢谢
title: "my_file"
author: "me"
date: "26/02/2020"
output:
html_document:
toc: yes
toc_depth: 3
toc_float:
collapsed: yes
smooth_scroll: yes
word_document: default
---
```{r child = 'child0.Rmd'}
```
```{r child = 'child1.Rmd'}
```
```{r child = 'child2.Rmd'}
```
```{r child = 'child3.Rmd'}
```
```{r child = 'child4.Rmd'}
```
【问题讨论】:
-
我认为您需要提供更多详细信息:需要多长时间?文件有多大?但一般来说,您可以将输入分解为单独的源文件,这些文件也产生单独的输出文件,而不仅仅是一个大的 .html 输出,并且应该允许更快地加载它们中的每一个。
blogdown包支持这一点。 -
整个 html 输出大约需要 30/40 秒,17.7 MB。如何在我的 rmd 中实现 blogdown?抱歉,我对此很陌生
-
我会添加一个给出一些细节的答案。
标签: html r hyperlink r-markdown knitr