Abstract

CGIwithR is a package for use with the R statistical computing environment, to facilitate processing of information from web-based forms, and reporting of results in the Hypertext Markup Language (HTML), through the Common Gateway Interface (CGI). CGIwithR permits the straightforward use of R as a CGI scripting language. This paper serves as an extended user manual for CGIwithR, supplementary to the R help pages installed with the package.

Highlights

  • Information entered on web-based forms is often processed by a Common Gateway Interface (CGI) script, a program called by the web server which takes the data from the form as its input and typically returns its output encoded in Hypertext Markup Language (HTML) for display on the client browser

  • Information entered on web-based forms is often processed by a CGI script, a program called by the web server which takes the data from the form as its input and typically returns its output encoded in HTML for display on the client browser

  • To make CGI scripts written in R available to the local web server, the files cgi-bin/.Rprofile and cgi-bin/R.cgi must be moved or copied to a directory in which the web server is permitted to look for CGI executables; this may need the help of a system administrator

Read more

Summary

Introduction

Information entered on web-based forms is often processed by a CGI script, a program called by the web server which takes the data from the form as its input and typically returns its output encoded in HTML for display on the client browser. The purpose of CGIwithR is to enable use of the S language, as implemented in the open-source R project (Ihaka and Gentleman, 1996), to write CGI scripts. This is useful for at least two reasons: (i) to make available the extensive statistical facilities of R in CGI scripts, and (ii) to allow statisticians and others familiar with the S language to write form-handlers without having first to learn another language such as Perl. The CGIwithR package has two main components: a set of R functions for decoding the form data and for report-writing in HTML; a ‘wrapper’ shell script, R.cgi, which is called by the web server, and which in turn calls. There is absolutely no warranty: CGIwithR is not fit for any purpose, and any use made of it is entirely at the risk of the user

Configuration and installation
How forms call scripts
Some scripting tools
Security
A simple example
The online ‘QV calculator’
A foolish and dangerous example
System compatibility
Decoding form data
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call