build.service {AnalysisPageServer} | R Documentation

## build.service

### Description

Build an AnalysisPage service

### Usage

    build.service(handler, param.set = default.service.paramset(handler),
      annotate.plot = FALSE, annotate.data.frame = FALSE, no.plot = TRUE,
      service = TRUE, skip.checks = TRUE, ...)

### Arguments

`handler` | The handler function to convert
`param.set` | AnalysisPageParamSet for the handler. Default: `default.service.paramset(handler)`
`annotate.plot` | Default: FALSE
`annotate.data.frame` | Default: FALSE
`no.plot` | Default: TRUE
`service` | Default: TRUE
`skip.checks` | Default: TRUE. This is passed through to `new.analysis.page` and should normally not be modified. (we don't check services because they are not required to provide default arguments.)
`...` | Further arguments to pass to `new.analysis.page`

### Details

Convert a functions into an AnalysisPage service. An AnalysisPage service is an AnalysisPage with the service flag set. That means that pages() will not return it, so it will not be directly available through the front end. The reason to do this would normally be so that it can be used to populate a combobox or other part of the website. In practice it also means that the return value will probably not use the AnalysisPageDataNode system—it is free to return some arbitrary JSON string or other text.

It is a wrapper for `new.analysis.page`, and passes all of its arguments through (but with different defaults now)

### Value

`AnalysisPage`

### Author(s)

Brad Friedman

### See Also

`new.analysis.page`

### Examples

    poem.file <- system.file("examples/in-a-station-of-the-metro.html", package="AnalysisPageServer")
    poem.html <- readLines(poem.file, warn = FALSE)
    poem <- build.service(function()  {
      new.response(paste0(poem.html, "\n"),
      content.type = "text/html")
    }, name = "poem")

[Package AnalysisPageServer version 1.14.0 Index]