Introduction
Client/server communcation
Example: lme4
Other stuff
Web Development with R
UCLA Statistics Seminar Jeroen Ooms
jeroenooms@gmail.com
November 2009, Los Angeles
Introduction
Client/server communcation
Example: lme4
Other stuff
What is a Web Application
Some examples:
• yeroon.net/ggplot2 • yeroon.net/lme4 • Pubertyplot • Stockplot • IRT tool
[video] [video] [video]
[video]
[video]
Introduction
Client/server communcation
Example: lme4
Other stuff
What is a Web Application
This presentation is about:
• Making Web Interfaces for Simple R applications. • R runs on the server. • User only needs a standard webbrowser. • Programming in R and HTML/Javascript (No Java!). • AJAX interfaces.
It is not about:
• Applications that require advanced queueing systems for
running multiple simultaneous R jobs.
• Distributed Computing. • Java.
Introduction
Client/server communcation
Example: lme4
Other stuff
Why Web Applications?
Convenient:
• Making new tools available to a wide audience. • User only needs a standard webbrowser. • Cross-platform.
Server-based by design:
• Efficient use of resources. • Easier to maintain. • Integration with existing services/databases/etc.
Because you have to:
• More and more services only available from the browser. • Many people can’t or dont want to install software.
Introduction
Client/server communcation
Example: lme4
Other stuff
Hello World!
RApache
• RApache is a module for the Apache web server. • It allows you to embed R scripts in a webpage. • It is one of the ways of connecting the HTTPD to R.
Demo:
• Brew scripting. • GET/POST. • Try Catch.
Introduction
Client/server communcation
Example: lme4
Other stuff
Web application Setup
Server
Request/Response
Workstation
Client
Calling R
Interface
Introduction
Client/server communcation
Example: lme4
Other stuff
ggplot2...