Skip to content

Commit

Permalink
Document shiny functions together
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Aug 22, 2024
1 parent 0394181 commit 4623762
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
6 changes: 2 additions & 4 deletions R/profvis.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ print.profvis <- function(x,
}
}

#' Widget output function for use in Shiny
#' Widget output and renders functions for use in Shiny
#'
#' @param outputId Output variable for profile visualization.
#'
Expand All @@ -304,13 +304,11 @@ profvisOutput <- function(outputId, width = '100%', height = '600px'){
shinyWidgetOutput(outputId, 'profvis', width, height, package = 'profvis')
}

#' Widget render function for use in Shiny
#'
#' @param expr An expression that returns a profvis object.
#' @param env The environment in which to evaluate `expr`.
#' @param quoted Is `expr` a quoted expression (with [quote()])?
#'
#' @export
#' @rdname profvisOutput
renderProfvis <- function(expr, env = parent.frame(), quoted = FALSE) {
if (!quoted) { expr <- substitute(expr) } # force quoted
shinyRenderWidget(expr, profvisOutput, env, quoted = TRUE)
Expand Down
13 changes: 11 additions & 2 deletions man/profvisOutput.Rd

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

18 changes: 0 additions & 18 deletions man/renderProfvis.Rd

This file was deleted.

0 comments on commit 4623762

Please sign in to comment.