[英]R-Markdown no longer knitting
在過去的幾年里,我創建了一個廣泛的降價文件,其中包含我在R上的筆記。今天它不再正確編織,也沒有任何備份版本正確編織。 輸出是正確輸出和代碼列表之間的交叉; 有時以##為前綴。
---
title: 'The R Companion'
fontsize: 11pt
toc: true
toc_depth: 4
geometry: "top = 2cm, bottom = 1.5cm, left = 2cm, right = 1.5cm"
output: pdf_document
---
\pagebreak
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(tidy.opts=list(width.cutoff=60),tidy=TRUE)
knitr::opts_chunk$set(fig.height = 3.5, fig.width = 7)
library(readr)
library(ggplot2)
library(knitr)
library(kableExtra)
library(lubridate)
library(dplyr)
library(tibble)
library(ggthemes)
library(RColorBrewer)
```
###Basic Data Manipulation
####Vector creation
```{r}
a <- 1:5
b <- 6:10
c <- append(a,b)
print(c)
# Append after c[4].
append(c, 4.5, after=4)
# Append before c[0].
append(c, c(-1, 0), after = 0)
```
輸出(下面)只有15個TOC列表中的兩個,標題沒有編織,輸出不完整/錯誤。 RStudio 1.2.1335,R 3.6.0。,Rmarkdown 1.12。 謝謝。
The R Companion
Contents
Creating and tidying data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 GraphicsI:Plot,axes,titleandlegend. .............................. 20
1
###Basic Data Manipulation ####Vector creation
## [1] 1 2 3 4 5 6 7 8 910
## [1] 1.0 2.0 3.0 4.0 4.5 5.0 6.0 7.0 8.0 9.0 10.0
## [1] -1 0 1 2 3 4 5 6 7 8 9 10
嘗試安裝formatR包。 在我安裝它之前它對我不起作用。 我只是運行你的代碼,這是我在word doc編寫的輸出。 這是你想要的?
The R Companion
Basic Data Manipulation
Vector creation
a <- 1:5
b <- 6:10
c <- append(a, b)
print(c)
## [1] 1 2 3 4 5 6 7 8 9 10
# Append after c[4].
append(c, 4.5, after = 4)
## [1] 1.0 2.0 3.0 4.0 4.5 5.0 6.0 7.0 8.0 9.0 10.0
# Append before c[0].
append(c, c(-1, 0), after = 0)
## [1] -1 0 1 2 3 4 5 6 7 8 9 10
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.