Rook
Rook copied to clipboard
Hmisc example application
It appears that the Hmisc example application is no longer working (at least in Windows 7 and 10).
Example code (from ?Rook::Builder
):
library(Rook)
s <- Rhttpd$new()
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.
And 127.0.0.1:17941/custom/Hmisc/brew/useR2007.rhtml results in "The 127.0.0.1 page isn't working" with "ERR_TOO_MANY_REDIRECTS" (Chrome browser).
sessionInfo()
R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393)
locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] brew_1.0-6 Hmisc_3.17-4 ggplot2_2.1.0 Formula_1.2-1 [5] survival_2.39-5 lattice_0.20-33 Rook_1.1-1
loaded via a namespace (and not attached): [1] Rcpp_0.12.6 chron_2.3-47 grid_3.3.1 [4] plyr_1.8.4 gtable_0.2.0 acepack_1.3-3.3 [7] scales_0.4.0 data.table_1.9.6 latticeExtra_0.6-28 [10] rpart_4.1-10 Matrix_1.2-6 splines_3.3.1 [13] RColorBrewer_1.1-2 tools_3.3.1 foreign_0.8-66 [16] munsell_0.4.3 colorspace_1.2-6 cluster_2.0.4 [19] nnet_7.3-12 gridExtra_2.2.1