Skip to content

Commit 8b93197

Browse files
Copilotyihui
andcommitted
Fix coordinate docs/example, roxygenize, add R-CMD-check workflow
- Fix coordinate() to use valid G2 v5 types: 'polar', 'theta', 'radial', 'radar', 'helix', 'parallel', 'cartesian' - Change example from coordinate('transpose') to coordinate('theta') - Run roxygenize() to regenerate all man pages - Add .github/workflows/R-CMD-check.yaml for CI - Add node_modules to .Rbuildignore - All examples verified in headless browser (Puppeteer) - R CMD check passes with 0 errors, 0 warnings, 0 notes Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
1 parent caed33d commit 8b93197

13 files changed

Lines changed: 101 additions & 22 deletions

File tree

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
^LICENSE\.md$
44
^README\.md$
55
^\.github$
6+
^node_modules$
7+
^package\.json$
8+
^package-lock\.json$

.github/workflows/R-CMD-check.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches: [main, master]
4+
pull_request:
5+
branches: [main, master]
6+
7+
name: R-CMD-check
8+
9+
permissions: read-all
10+
11+
jobs:
12+
R-CMD-check:
13+
runs-on: ${{ matrix.config.os }}
14+
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
config:
21+
- {os: macos-latest, r: 'release'}
22+
- {os: windows-latest, r: 'release'}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
26+
27+
env:
28+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: r-lib/actions/setup-r@v2
35+
with:
36+
r-version: ${{ matrix.config.r }}
37+
http-user-agent: ${{ matrix.config.http-user-agent }}
38+
use-public-rspm: true
39+
40+
- uses: r-lib/actions/setup-r-dependencies@v2
41+
with:
42+
extra-packages: any::rcmdcheck
43+
needs: check
44+
45+
- uses: r-lib/actions/check-r-package@v2
46+
with:
47+
upload-snapshots: true
48+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Suggests:
1818
testit
1919
Encoding: UTF-8
2020
Roxygen: list(markdown = TRUE)
21-
RoxygenNote: 7.3.2
21+
RoxygenNote: 7.3.3

R/gglite.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,17 @@ scale_of = function(chart, field, ...) {
144144
#' Set the Coordinate System
145145
#'
146146
#' @param chart A `g2` object.
147-
#' @param type Coordinate type (e.g., `'polar'`, `'theta'`, `'transpose'`).
148-
#' @param ... Additional coordinate options.
147+
#' @param type Coordinate type. Supported types include `'polar'`, `'theta'`,
148+
#' `'radial'`, `'radar'`, `'helix'`, `'parallel'`, and `'cartesian'` (the
149+
#' default). See the G2 coordinate documentation for details.
150+
#' @param ... Additional coordinate options (e.g., `innerRadius`, `outerRadius`,
151+
#' `startAngle`, `endAngle`, or `transform`).
149152
#' @return The modified `g2` object.
150153
#' @export
151154
#' @examples
152155
#' g2(data.frame(x = c('A', 'B'), y = c(3, 7)), x = x, y = y) |>
153156
#' mark_interval() |>
154-
#' coordinate('transpose')
157+
#' coordinate('theta')
155158
coordinate = function(chart, type, ...) {
156159
chart$coords = c(list(type = type), list(...))
157160
chart

man/build_config.Rd

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chart_html.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/coordinate.Rd

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/g2_cdn.Rd

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/interact.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mark.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)