Skip to content

Commit

Permalink
simplify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
huizezhang-sherry committed Jun 23, 2024
1 parent a97c35d commit 8fe5cfb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
7 changes: 1 addition & 6 deletions R/draw.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ add_space <- function(dt, space_alpha = 0.5, space_fill = "grey92", space_color
#' library(ggplot2)
#' # construct the space and start df for plotting
#' space <- tibble::tibble(x0 = 0, y0 = 0, r = 5)
#' start <- holes_1d_geo %>%
#' holes_1d_geo %>%
#' compute_pca() %>%
#' purrr::pluck("aug") %>%
#' clean_method() %>%
#' get_start()
#' ggplot() +
#' add_space(dt = space) +
#' add_start(dt = start, start_color = info) +
#' theme_void() +
#' theme(aspect.ratio = 1)
#' @family draw functions
#' @export
add_start <- function(dt, start_size = 5, start_alpha = 1, start_color = NULL, ...) {
Expand Down
2 changes: 2 additions & 0 deletions R/explore-space-pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' explore_space_pca(group = method, details = TRUE) +
#' scale_color_discrete_botanical()
#'
#' \dontrun{
#' best <- matrix(c(0, 1, 0, 0, 0), nrow = 5)
#' dt <- bind_theoretical(holes_1d_jellyfish, best, tourr::holes(), raw_data = boa5)
#' explore_space_start(dt)
Expand All @@ -27,6 +28,7 @@
#' dt, facet = loop, interp_size = 0.5, theo_size = 10,
#' start_size = 1, end_size = 3
#' )
#' }
#' @export
explore_space_start <- function(dt, group = NULL, pca = TRUE, ...) {

Expand Down
7 changes: 1 addition & 6 deletions man/add_start.Rd

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

2 changes: 2 additions & 0 deletions man/explore_space_pca.Rd

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

0 comments on commit 8fe5cfb

Please sign in to comment.