Download Creating user friendly web interfaces for R scripts automatically

Transcript
9.8.6
Number of columns
On the next page of Rwui you can specify how many columns to divide each table into. If more than
one results file is to be displayed in a table and you would like them displayed side by side, rather than
one below the other, then divide the table into columns.
9.8.7
Displaying current results on analysis page
In applications created by Rwui, the results of each analysis are accessed from a list of links at the foot
of the analysis page. But you also have the option of displaying the results files from the current analysis
on the analysis page itself.
9.9
Process information
If your R script takes some time to execute you may want to provide the user with process information in
order to inform them of the progress the R script is making. If you would like to do this check the box.
For this facility to work, your R script needs to periodically append lines to a file called ‘process info.txt’
with progress information for the user. i.e. you need to add lines such as ‘write(“Starting the analysis
....”, file=“process info.txt”, append=TRUE)’ at strategic points in your R script. The R function
‘capture.output’ can also be useful for appending lines to the file ‘process info.txt’. For example, from
microarray analysis: capture.output(expr = rma(data), append=TRUE, file=“process info.txt”).
The completed web application reads the file ‘process info.txt’ every few seconds and displays it in a
Javascript popup window. So a user of your application needs to have Javascript enabled in their browser
for this feature to work.
(To enable Javascript: In Mozilla go to ‘Edit’ ⇒ ‘Preferences’ ⇒ ‘Advanced’ ⇒ ‘Scripts and Plugins’ and
tick ‘Enable Javascript’ for ‘Navigator’ at the top. In IE go to ‘Tools’ ⇒ ‘Internet Options’ ⇒‘Security’
⇒ ‘Custom Level’, scroll down to ‘Scripting’ ⇒ ‘Advance Scripting’ and tick ‘Enable’.)
You can specify the default size (in pixels) of the popup window in which the process information appears.
You can also specify the refresh rate in seconds for the message in the popup window. The default refresh
rate is every 5 seconds.
In addition to, or instead of, a text process information box the application can also display a graphical
process information box. This might be useful, for example, for showing users graphically the convergence
of an iterative calculation. Your R script must write the periodically updated graph, for example at each
iteration, to a file called ‘process graph.jpg’.
9.10
Upload R script
Upload the R script.
19