Skip to content

Commit 93ff957

Browse files
zorroozclaude
andcommitted
docs: mark_map 示例改用 requireNamespace 条件执行,pkgdown CI 可渲染
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a2b10de commit 93ff957

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@ Thumbs.db
3333

3434
# Package-specific
3535
playground.R
36-
CLAUDE.md
37-
AGENTS.md
3836
iris_plot.svg
3937
scratch/
4038
*.Rproj.user/
4139
Rplots*.pdf
42-
a.pdf
4340

4441
# pkgdown local build (deployed from CI to gh-pages branch)
4542
docs/

R/mark.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,16 +315,20 @@ mark_violin <- S7::new_generic(
315315
#' @param plot A plotit object
316316
#' @param mapping Optional new aesthetics
317317
#' @param data Optional sf data frame for this layer
318-
#' @param position Position adjustment.
318+
#' @param position Position adjustment (ignored for sf layers).
319319
#' @param rasterize If `TRUE`, rasterize via `ggrastr::rasterise()`.
320320
#' @param rasterize_dpi DPI for rasterization (default 300).
321321
#' @param rasterize_dev Graphics device for rasterization (default `"cairo"`).
322322
#' @param ... Other arguments passed to `geom_sf`
323323
#' @return Modified plotit object
324+
#' @references
325+
#' Vega-Lite: \href{https://vega.github.io/vega-lite/docs/geoshape.html}{Geoshape}
326+
#'
327+
#' AntV G2: \href{https://g2.antv.antgroup.com/en/api/mark/geo-path}{GeoPath}
324328
#' @examples
325-
#' \dontrun{
326-
#' nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
327-
#' plotit(nc, encode(geometry = geometry)) |> mark_map()
329+
#' if (requireNamespace("sf", quietly = TRUE)) {
330+
#' nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
331+
#' plotit(nc, encode(geometry = geometry)) |> mark_map()
328332
#' }
329333
#' @export
330334
mark_map <- S7::new_generic(

0 commit comments

Comments
 (0)