# The following is the Hmisc example. Explore the folder
# system.file('exampleApps/Hmisc',package='Rook') for more information.
s <- Rhttpd$new()
if (FALSE) {
library(Hmisc)
dir.create(file.path(tempdir(),'plots'),showWarnings=FALSE)
s$add( name="Hmisc",
app=Builder$new(
Static$new(
urls = c('/css','/images','/javascript'),
root = system.file('exampleApps/Hmisc',package='Rook')
),
Static$new(urls='/plots',root=tempdir()),
Brewery$new(
url='/brew',
root= system.file('exampleApps/Hmisc',package='Rook'),
imagepath=file.path(tempdir(),'plots'),
imageurl='../plots/'
),
Redirect$new('/brew/useR2007.rhtml')
)
)
s$start(quiet=TRUE)
s$browse('Hmisc') # Opens a browser window to the application.
s$remove(all=TRUE)
s$stop()
}
Run the code above in your browser using DataLab