Description Usage Arguments Details Value Author(s)
Build rapache app from an AnalysisPageRegistry
1 2 3 4 5 6 7 8 9 10 11 | rapache.app.from.registry(registry, page.param = "page",
textarea.wrap.param = "textarea_wrap", device.param = "device",
decoder.param = "decoder", max.regions.param = "max_annotated_regions",
default.max.regions = 10000, force = FALSE,
tmpdir = Sys.getenv("WEB_TMPDIR"), tmpdir.timeout.seconds = 600,
devices = .default.device.list, other.mime.types = c(json =
"application/json"), mime.types = c(sapply(devices, "[[", "mime.type"),
other.mime.types),
query.param.decoders = .build.default.query.param.decoders(),
brand.builder = .default.brand.builder, logger = create.logger(stderr(),
log4r:::FATAL))
|
registry |
AnalysisPageRegistry from which to build you app. |
page.param |
Character. Name for the parameter which specifies the page. Default "page" |
textarea.wrap.param |
Character. Name for the parameter which specifies whether the response should be wrapped in a |
device.param |
Character. Name for the parameter which specifices the plotting device. Default: "device". |
decoder.param |
Character. Name for the parameter which specifices the form query parameter decoding method. Default: "decoder". |
max.regions.param |
String. Name for the parameter which specifies the maximum number of regions for annotation. Default: "max_annotated_regions". |
default.max.regions |
Default maximum number of regions for annotation. If a plot has more than this many elements then it will not be annotated. Default: 10000. |
force |
Logical. If set then an invalid registry is a warning instead of an error. |
tmpdir |
Temporary directory into which plot files should be written. By default this is taken from the WEB_TMPDIR environment variable. It is checked upon opening. It is important under Apache that all of the processes use the same directory, otherwise they won't be able to find the plots made by other processes. |
tmpdir.timeout.seconds |
Temporary files will expire after this time. Default: 600 (10 minutes) |
devices |
Named list. The names of the vector are the names of allowed plotting devices. The values
are themselves lists, each having a |
other.mime.types |
Named charvec giving a mapping from file extensions other than those
already in |
mime.types |
This is a named charvec giving a mapping from file extensions to mime types. Only files with
extensions in this list can be served from the temporary storage/retrieval area. The default is to
take the extensions/MIME-types defined in |
query.param.decoders |
Names list. The names are the names of allowed query param decoders (valid values for
the |
brand.builder |
This is a function that takes a single argument called "persistent" which is a list of key value pairs representing
the internal "persistent" state of the app. The persistent state is a namespace that particular parameters of particular pages
can draw from, with the possible option of locking those parameters to the values in the persistent namespace. The purpose of the
|
logger |
log4r object, optional |
This does most but not all of the work. You should create an R script that builds your page registry, then builds an rapache.app with this function. Within that R script you call add.handlers.to.global to install the 5 handlers (handle.pages/handle.params/handle.plot/handle.data/handle.meta.data).
Next you have to tell apache to source your script upon startup. The directive for your httpd.conf is as follows:
RSourceOnStartup "/gne/home/friedmab/scr/apache-test/R-startup.R"
Finally, you have to register the five handlers. This is done as follows
AnalysisPageRApacheApp
Brad Friedman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.