Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: roxygen2 warnings and improve doc formatting #2388

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Suggests:
rsvg,
ggridges
LazyData: true
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Config/Needs/check:
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ S3method(print,api_grid_local)
S3method(print,api_plot)
S3method(print,kaleidoScope)
S3method(print,plotly_data)
S3method(process,api_image)
S3method(process,api_plot)
S3method(process,default)
S3method(to_basic,GeomAbline)
S3method(to_basic,GeomAlluvium)
S3method(to_basic,GeomAnnotationMap)
Expand Down
2 changes: 0 additions & 2 deletions R/animate.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ animation_opts_defaults <- function() {
}


#' @inheritParams animation_opts
#' @param hide remove the animation slider?
#' @param ... for `animation_slider`, attributes are passed to a special
#' layout.sliders object tied to the animation frames.
Expand All @@ -149,7 +148,6 @@ animation_slider <- function(p, hide = FALSE, ...) {
}


#' @inheritParams animation_slider
#' @param label a character string used for the animation button's label
#' @export
#' @rdname animation
Expand Down
5 changes: 0 additions & 5 deletions R/api_exports.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@
#' api("folders", "POST", list(path = "/starts/at/root/and/ends/here"))
#'
#' }
#'


#' @rdname api
#' @export
api_create <- function(x = last_plot(), filename = NULL,
fileopt = c("overwrite", "new"),
sharing = c("public", "private", "secret"), ...) {
Expand Down
1 change: 0 additions & 1 deletion R/orca.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file),

#' Orca image export server
#'
#' @inheritParams orca
#' @param port Sets the server's port number.
#' @param keep_alive Turn on keep alive mode where orca will (try to) relaunch server if process unexpectedly exits.
#' @param window_max_number Sets maximum number of browser windows the server can keep open at a given time.
Expand Down
2 changes: 1 addition & 1 deletion R/plotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +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] 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
13 changes: 7 additions & 6 deletions R/plotly_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,17 @@ print.plotly_data <- function(x, ...) {

#' Highlight/query data based on primary key
#'
#' 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].
#' 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()`
#' @param ... arguments passed to
#' [`crosstalk::SharedData$new()`][crosstalk::SharedData].
#' @export
#' @author Carson Sievert
#' @return An object of class [crosstalk::SharedData]
#' @return An object of class [`crosstalk::SharedData`].
#' @seealso [highlight]
highlight_key <- function(x, ...) {
UseMethod("highlight_key")
Expand Down
3 changes: 3 additions & 0 deletions R/process.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ process <- function(resp) {
UseMethod("process")
}

#' @export
process.default <- function(resp) {
json_content(relay_error(resp))
}

#' @export
process.api_plot <- function(resp) {
json_content(relay_error(resp))
}

#' @export
process.api_image <- function(resp) {
relay_error(resp)
type <- resp[["headers"]][["content-type"]]
Expand Down
2 changes: 1 addition & 1 deletion man/add_trace.Rd

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

13 changes: 7 additions & 6 deletions man/highlight_key.Rd

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

2 changes: 1 addition & 1 deletion man/plot_ly.Rd

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

Loading