I currently have an RMarkdown file where I first have latex code specifying a table, then I have a coding chunk right after. However, when I hit "knit", RMarkdown reverses the order in which they appear by first showing the coding chunk, then the latex table. Is there a way to create a break or a segmentation so that my latex table first appears, then the r coding chunk? Thanks!
Asked
Active
Viewed 373 times
0
-
Does this help?https://stackoverflow.com/a/30243074/3358272 – r2evans Feb 27 '18 at 03:26
-
Disregard, this is likely due to how LaTeX organizes things. It places tables and figures (plots) in "optimal" places, which is not necessarily where you instantiate it. Look up "latex table placement" (not rmarkdown) and you should see plenty of discussion. – r2evans Feb 27 '18 at 03:39
-
You are looking to hold a *float* in place, this is basically a [duplicate](https://stackoverflow.com/questions/29696172/how-to-hold-figure-position-with-figure-caption-in-pdf-output-of-knitr) other than the fact the linked question refers to a figure... but the same thing applies to your table. – Kevin Arseneau Feb 27 '18 at 05:29