R: ggplotlyr

ggplotlyr {Hmisc} | R Documentation

## ggplotlyr

### Description

Render `plotly` Graphic from a `ggplot2` Object

### Usage

    ggplotlyr(ggobject, tooltip = "label", remove = "txt: ", ...)

### Arguments

`ggobject` | an object produced by `ggplot`
`tooltip` | attribute specified to `ggplot` to hold hover text
`remove` | extraneous text to remove from hover text. Default is set to assume `tooltip='label'` and assumed the user specified `aes(..., label=txt)`. If you instead specified `aes(..., label=myvar)` use `remove='myvar: '`.
`...` | other arguments passed to `ggplotly`

### Details

Uses `plotly::ggplotly()` to render a `plotly` graphic with a specified tooltip attribute, removing extraneous text that `ggplotly` puts in hover text when `tooltip='label'`

### Value

a `plotly` object

### Author(s)

Frank Harrell

[Package Hmisc version 4.7-0 Index]