mapInput: An SVG Human Body Input This input operates like a...

Description Usage Arguments Value Examples

View source: R/map-input.R

Description

An SVG Human Body Input

This input operates like a shiny::radioButtons() where you can select one of the body parts!

Usage

1
2
3
4
5
6
7
8
mapInput(
  inputId,
  data = NULL,
  fillcolor = "transparent",
  bordercolor = "#000080",
  borderwidth = "2px",
  ...
)

Arguments

inputId

The input id

data

a vector of 50 numbers to be converted to a continuous color scale. The numbers correspond to the following body part vector:

  1. head

  2. left-shoulder

  3. right-shoulder

  4. left-arm

  5. right-arm

  6. left-hand

  7. right-hand

  8. chest

  9. stomach

  10. left-leg

  11. right-lef

  12. left-foot

  13. right-foot

...

Passed to htmltools::div()

low.col

continous color scale applied to data - this is the low vale color

high.col

continous color scale applied to data - this is the high value color

color

a single fill color for all body parts

Value

The value returned by the input to the Shiny server is either 'NULL' when no body part is select or a character string containing the selected body part

Examples

1
2
3
4
5
6
7
8
## Not run: 
bodyInput("human", data = rnorm(13, 100), low.col = "pink", high.col = "purple")

## End(Not run)
## Not run: 
bodyInput("human", color = "steelblue")

## End(Not run)

willdebras/shinyMap documentation built on Jan. 1, 2021, 12:48 p.m.