diff --git a/R/plotly.R b/R/plotly.R index d38040efa5..c61db84253 100644 --- a/R/plotly.R +++ b/R/plotly.R @@ -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 diff --git a/R/plotly_data.R b/R/plotly_data.R index e31288096c..38dcb8c780 100644 --- a/R/plotly_data.R +++ b/R/plotly_data.R @@ -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") diff --git a/man/add_trace.Rd b/man/add_trace.Rd index 7370ecb6da..bd0c9d0703 100644 --- a/man/add_trace.Rd +++ b/man/add_trace.Rd @@ -126,8 +126,7 @@ See \code{\link[=schema]{schema()}} for a list of acceptable attributes for a gi provided at this level may override other arguments (e.g. \code{plot_ly(x = 1:10, y = 1:10, color = I("red"), marker = list(color = "blue"))}).} -\item{data}{A data frame (optional) or -\code{\link[crosstalk:SharedData]{crosstalk::SharedData}} object.} +\item{data}{A data frame (optional) or \code{\link[crosstalk:SharedData]{crosstalk::SharedData}} object.} \item{inherit}{inherit attributes from \code{\link[=plot_ly]{plot_ly()}}?} diff --git a/man/highlight_key.Rd b/man/highlight_key.Rd index a7c5c6f089..079921cd34 100644 --- a/man/highlight_key.Rd +++ b/man/highlight_key.Rd @@ -16,10 +16,10 @@ highlight_key(x, ...) An object of class \code{\link[crosstalk:SharedData]{crosstalk::SharedData}}. } \description{ -This function simply creates an object of class -\code{\link[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 \code{\link[=highlight]{highlight()}}. +This function simply creates an object of class \code{\link[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 \code{\link[=highlight]{highlight()}}. } \seealso{ \link{highlight} diff --git a/man/plot_ly.Rd b/man/plot_ly.Rd index b8d517f356..c287d35d6f 100644 --- a/man/plot_ly.Rd +++ b/man/plot_ly.Rd @@ -31,8 +31,7 @@ plot_ly( ) } \arguments{ -\item{data}{A data frame (optional) or -\code{\link[crosstalk:SharedData]{crosstalk::SharedData}} object.} +\item{data}{A data frame (optional) or \code{\link[crosstalk:SharedData]{crosstalk::SharedData}} object.} \item{...}{Arguments (i.e., attributes) passed along to the trace \code{type}. See \code{\link[=schema]{schema()}} for a list of acceptable attributes for a given trace \code{type}