News for hackers. Stuff that matters.
Re:Shiny: Easy web applications in R by minimaxir on Sunday September 22, 2013 @10:41PM (#6428938)
This is very interesting technology. The only concern is that it seems very slow. (justifiable, as it's generating a full plot each time which takes a bit even on my local machine)

See the full web page example [1]. It might be hard to scale a full website using the tech but it is useful in a pinch, especially if you already have a script to generate plots. (of which I personally have many)

[1]: http://glimmer.rstudio.com/pioneer/pensions/

Re:Shiny: Easy web applications in R by jcheng on Monday September 23, 2013 @12:27AM (#6429158)
Thanks for the feedback!

It's true that Shiny isn't designed for blazing performance (it's built on R, after all) but the pensions app is particularly slow--I believe it's actually the calculations, not the plotting, that's so slow. It is also running on one of our free hosting accounts, that only allocates a single, single-threaded R process to service it; so you're competing with all the other visitors to that app for the attention of a single thread.

I'd encourage you and anyone else who might find Shiny useful to try it with your own data and your own scripts. You might be surprised at how decent the performance can be, especially once you've gotten your head around reactive programming and learn how to structure your code to take advantage of it.

That said, Shiny is definitely not designed to be a general purpose web development framework. It is specifically designed for R users to build single-page apps for analyzing and/or visualizing data. Rather than replacing Rails, it is aimed at replacing PDFs and LaTeX documents, which is the usual way R users pass their results around.

Re:Shiny: Easy web applications in R by minimaxir on Monday September 23, 2013 @01:07AM (#6429241)
Thanks for the response. That seems fair, and I'll definitely give it a shot. :)
Re:Shiny: Easy web applications in R by macarthy12 on Monday September 23, 2013 @05:05AM (#6429718)
Is there any way to cache, or memorize calculations in Shiny?
Re:Shiny: Easy web applications in R by Blahah on Monday September 23, 2013 @05:10AM (#6429729)
Yes, the whole paradigm is to use 'reactive' functions - i.e. functions whose output is cached.
Re:Shiny: Easy web applications in R by macarthy12 on Monday September 23, 2013 @06:20AM (#6429894)
I guess I'm wondering it cache across requests?
Re:Shiny: Easy web applications in R by jcheng on Monday September 23, 2013 @10:20AM (#6431092)
In the Shiny framework we think less about short-lived HTTP requests, and more about long-lived (websocket) sessions. Reactive expressions cache their results within or across sessions, depending on where they are declared (this is just a natural result of R's lexical scoping).

http://rstudio.github.io/shiny/tutorial/#scoping