Я хочу, чтобы таблица, созданная в документе rmarkdown, выводилась в формате pdf, была зафиксирована на месте и гибко не помещалась между текстом.
Например, мой код:
---
title: "Rest"
author: "Dowdy"
date: "3/23/2019"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
library(stargazer)
library(data.table)
```
Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo.
Hello friend.
\begin{center}
```{r star, results='asis',echo=F,eval=T, message=FALSE}
star = capture.output(stargazer(data.table(cars)[1:15],digits=3,type = "latex",summary=F,digits.extra = 2,header = F))
star = gsub("& \\$([0-9]+)\\$", "& \\$ 0.000 \\$", star)
cat(star)
```
\end{center}
Welcome to my world of toys. Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.Welcome to my world of toys.
Welcome to my world of toys.
Welcome to my world of toys. gs I am testing heloo.
Of all the things I am testing heloo. Of all the things I am testing heloo. Of all the things I am testing heloo.
Of all the things I am testing heloo. Of all the things I am testing heloo.
1. Test hi hihhihihih
2. why is this hiiii
3. why test test test
4. test test test
К сожалению, вывод таков:
Я не хочу, чтобы изображение разбивало мой нумерованный список и текст таким образом. Я хочу, чтобы порядок текста и изображения был точно таким, как я его напечатал в документе rmarkdown. В частности, этот нумерованный список и абзац об игрушках должны появляться после таблицы, как это указано в уценке.
Что касается цифр, этот вопрос пытался сделать то, что я хочу сделать, я верю. Конечно, я спрашиваю это для таблиц вместо цифр, поэтому решение не помогает мне.