Skip to content

Commit

Permalink
refactor: simplify roxygen2 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b committed Sep 15, 2024
1 parent 5d6c288 commit 6937fad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
3 changes: 1 addition & 2 deletions R/plotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
#' help inform default axis/scale titles
#' (e.g., `plot_ly(x = mtcars$wt)` vs `plot_ly(x = ~mtcars$wt)`)
#'
#' @param data A data frame (optional) or
#' [`crosstalk::SharedData`][crosstalk::SharedData] object.
#' @param ... Arguments (i.e., attributes) passed along to the trace `type`.
#' See [schema()] for a list of acceptable attributes for a given trace `type`
#' (by going to `traces` -> `type` -> `attributes`). Note that attributes
#' provided at this level may override other arguments
#' (e.g. `plot_ly(x = 1:10, y = 1:10, color = I("red"), marker = list(color = "blue"))`).
#' @param data A data frame (optional) or [`crosstalk::SharedData`] object.
#' @param type A character string specifying the trace type (e.g. `"scatter"`, `"bar"`, `"box"`, etc).
#' If specified, it *always* creates a trace, otherwise
#' @param name Values mapped to the trace's name attribute. Since a trace can
Expand Down
10 changes: 5 additions & 5 deletions R/plotly_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ print.plotly_data <- function(x, ...) {

#' Highlight/query data based on primary key
#'
#' This function simply creates an object of class
#' [`crosstalk::SharedData`][crosstalk::SharedData]. The reason it exists is to
#' make it easier to teach others how to leverage its functionality in plotly.
#' It also makes it more discoverable if one is already aware of [highlight()].
#' This function simply creates an object of class [`crosstalk::SharedData`].
#' The reason it exists is to make it easier to teach others how to leverage its
#' functionality in plotly. It also makes it more discoverable if one is already
#' aware of [highlight()].
#'
#' @param x a plotly visualization or a `data.frame`.
#' @param ... arguments passed to
#' [`crosstalk::SharedData$new()`][crosstalk::SharedData].
#' @export
#' @author Carson Sievert
#' @return An object of class [`crosstalk::SharedData`][crosstalk::SharedData].
#' @return An object of class [`crosstalk::SharedData`].
#' @seealso [highlight]
highlight_key <- function(x, ...) {
UseMethod("highlight_key")
Expand Down
3 changes: 1 addition & 2 deletions man/add_trace.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/highlight_key.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/plot_ly.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6937fad

Please sign in to comment.