Package suggestion: rmarkdown


#1

I’m a big fan of rmarkdown, which has been gaining a lot of development / recognition steam lately. It’s a markdown flavor, that allows for (more or less) complete academic publishing, with inline (REPLed) R-Code, and pandoc-backed functions to export in a variety of formats.
This really could be the future of (academic), open-science publishing.

RStudio has a lot of support built in, but other than that, there’s not a lot of editors who really let you tap into it. (Not even on Sublime Text).

I don’t have the skills to get to work with this myself, just wanted to throw this out and see whether other people were interested in this, too.

Interesting features might be:

  • syntax highlighting, including R and knitr chunk options
  • autocomplete for @ cites from bibtex (maybe via https://atom.io/packages/autocomplete-bibtex)
  • Build systems (via invoking the respective R functions that rmarkdown is programmed in)
  • REPL system for inline R (maybe via https://atom.io/packages/repl)
  • R function / object autocomplete, inline help (as in Rstudio – now that’s a bit wish)

RStudio does much of this ready, but as IDEs go, it’s just not a as fast, elegant and versatile as a general-purpose editor such as atom.


#2

저도 위 제안에 격하게 공감합니다. I also agree :smiley:


#3

I would love to see some skillful package maker realize this as well.


#4

I second this as well.

I currently use RStudio to create R Markdown documents, but I would really like to see something faster and more elegant.

Max, do you also still use RStudio, or have you found a better option yet?

  • Carmen

#5

Hey Carmen, great to hear that you’d like this as well – I’m still on RStudio :confused:


#6

I have found editR as a potential alternative.

What do you think?

~ Robert


#7

edit seems cool, though it feels a little bit like an RStudio fork-correct?

Also, I really prefer to have a general IDE/editor (the line seems to blur with atom) as a basis, not some special purpose IDE or editor (like RStudio).

For example, I’d like the git support built in atom and a bunch of other packages.


#8

I know I’m responding long after this question was created, but I would love to see something like this as well. I’ve used some hacks, like using platformio-ide-terminal to start a R session within atom to send code to.

I’ve also created a snippet that will make Makefiles that automatically compile Markdown into pdf (this can easily be changed if you want). Just add this snippet to the snippets.cson file. In the same directory that you have the .Rmd, make a new file, call this Makefile, then if you type rmdmake and press tab, this code should appear. I then use the build package to easily run the Makefile and knit the .Rmd. If you have a pdf, you can use the pdf-view package to view the resulting .pdf file.

'.source.makefile':
  'read.id':
    'prefix': 'rmdmake'
    'body': """
R_OPTS = --no-save --no-restore --no-init-file --no-site-file
RMARKDOWN = $(wildcard *.Rmd)
OUTPUT = $(RMARKDOWN:.Rmd=.pdf)

$(OUTPUT): $(RMARKDOWN)
	R ${R_OPTS} -e "rmarkdown::render('$<')"
    """

It would be awesome to have a button that you click on that does all this for you, but this is pretty close, since all you have to do is use the build: trigger command. However, I would love better support for the R language in general, since a lot of the indentation rules that are used in RStudio are not possible right now in Atom.


#9

Hallo jfiksel,
I didn’t really understand what you did for running Rmarkdown in atom.
I missed the part of typing rmdmake. Should I type it in the terminal?
:sweat_smile:


#11

Hey @maxheld83,
I totally agree with you! I very much like the functionality of rmarkdown. However, there is something about Rstudio that I do not like without being really able to say what it is. Are there any movements in the Atom community to build the support for this?

I am looking for a platform that allows these tasks:

  • executing code chunks and seeing the output and graphs inline (like in Jupyter and Rstudio)
  • So either there must be cells like in jupyter or I need shortcuts to quickly insert chunks like in Rstudio
  • Best possible compatibility for Python and R
  • Latex support to insert math formulas
  • Bibtex support for referencing
  • Writing in Markdown or rmarkdown
  • Spell check
  • Exporting into docx, pdf and html

Really gold would be if you could use objects interchangeable between R and Python. I think that this is not possible yet and Rstudio seems to do the best job here as is allows at least executing both in the same document.

Let me know if you figured something out!
Best


#12

I am very much interested too


#13

I would really like to see this, too. So far, I’m sticking with nvim-R and vim, but if there was an alternative for Atom, I’d definitely give it a try


#14

I’m still very interested in this. Being able to “knit” documents using knitr would be amazing. This is pretty much all that is missing, aside from a few select things (outlined in OP), that make the move from Rstudio completely viable. Thanks!