Can R create on-the-fly graphics for a website?

I use the Flex / ColdFusion / MSSQl compilation to input data from users to create diagrams for a website. Is this possible in R? I used RODBC and sqlQuery as a way to create static graphs, but could not find a way to do this dynamically. For you ju

+8
sql-server r
source share
1 answer

Of course, you can use the fantastic Apache module, which allows for runtime execution of R-scripts - RApache . You can define the R script and catch (unserialize) parameters (for example, via a JSON string or an encoded URL), plot the graph and load the result using AJAX. This is pretty much what I did in my application .

If you are not comfortable with the R-graph capabilities (and I'm sure it won’t), you can try googleVis or canvas packages. The first is the "only" library for the GoogleVis API for R, and I'm sure you will like it later if you are familiar with the HTML5 canvas. Some guys found this helpful.

So the final answer is: yes you can! . You only need to decide whether you intend to create graphs on the client side or on the server side. Of course, even if you decide to create graphs on the client side, you should massage your data in R and return it in serialized form (JSON or XML encoding). I know that ExtJS 4 also has a good interface for creating graphs on the client side, but I did not use it (read: "generally").

+9
source share

All Articles