remacsmarkdownknitress

Emacs ESS markdown, cant make pdf


I am trying to knit a pdf from Emacs/ess. I can knit the file using RStudio to make a pdf. Using Emacs I can weave it and export it (C-c C-c e), but it exports as a .txt Here is an example code:

---
title: "Untitled"
author: "SB"
date: "Wednesday, February 04, 2015"
output: pdf_document
---

You can embed an R code chunk like this:

```{r}
summary(cars)
```

You can also embed plots, for example:

```{r, echo=FALSE}
plot(cars)
```

How do I export as a .pdf?


Solution

  • I believe you'll need to go outside of ESS for this:

    Libraries for literate data analysis are obsolete and not loaded by default. This includes ess-noweb, ess-swv, and related functionality like Rnw-mode. Users are encouraged to switch to one of several other packages that deal with these modes. For example, polymode https://github.com/polymode/poly-R/, https://polymode.github.io/, or markdown-mode with edit-indirect https://jblevins.org/projects/markdown-mode.

    Polymode/poly-R lists support for several weavers:

    Weavers:

    • knitr
    • knitr-ESS
    • Sweave-ESS
    • Sweave