timelyportfolio / buildingwidgets

repo for a htmlwidget a week documented at https://buildingwidgets.com
https://timelyportfolio.github.io/buildingwidgets/
MIT License
63 stars 12 forks source link

ace editor? #33

Open vnijs opened 9 years ago

vnijs commented 9 years ago

Would there be any benefit to using htmlwidgets for the ace editor?

There is, of course, shinyAce but that hasn't been updated on CRAN since 2013-11-05

timelyportfolio commented 9 years ago

Great thought. Actually think I prefer codemirror

vnijs commented 9 years ago

Codemirror looks very nice. My main interest is in using it with knitr / rmarkdown inside a shiny app. Actually, what I would like even more is an ipython type setup for R with code (and markdown) textareas but without the need for python :) Seen anything like that?

Yihui has https://github.com/yihui/rnotebook but I don't know if that could be linked to shiny textareas.

smartinsightsfromdata commented 9 years ago

@vnijs Have you seen the R Notebook as described here? http://blog.revolutionanalytics.com/2015/01/interactive-r-notebooks-on-powerful-cloud-hardware.html

It refers to this github page, by the great fperez (ipython father) https://github.com/fperez/ipython-rkernel

I haven't tried it yet, but it is definitely on my TODO list.

vnijs commented 9 years ago

@smartinsightsfromdata I did see that. There is also IRkernel. The main issue I have is that this requires a full install of Python (e.g., through anaconda). R already has much of the machinery to do quire a few parts of ipython (afaik) so adding a HUGE dependencies seems overkill.

I would like something that could be included in an app. Shiny with dynamically created textareas would be a good step already. My main issues are (1) editing with syntax highlighting in the text areas and (2) saving and recreating the 'notebook'. Saving and restoring the state of an app is not hard (see the saving-and-loading section in http://vnijs.github.io/radiant/). However, recreating an arbitrary number of dynamically generated code-input areas is more challenging.