Skip to content

Commit 00ea7c0

Browse files
authored
Merge pull request #1817 from olivroy/doc-tweaks
Improve datasets docs, fix typo + update visual tests
2 parents e74cf03 + 288b7ae commit 00ea7c0

27 files changed

Lines changed: 128 additions & 13 deletions

R/datasets.R

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
#' @section Dataset Introduced:
108108
#' `v0.2.0.5` (March 31, 2020)
109109
#'
110+
#' @examples
111+
#' dplyr::glimpse(sza)
110112
"sza"
111113

112114
#' Deluxe automobiles from the 2014-2017 period
@@ -163,6 +165,8 @@
163165
#' @section Dataset Introduced:
164166
#' `v0.2.0.5` (March 31, 2020)
165167
#'
168+
#' @examples
169+
#' dplyr::glimpse(gtcars)
166170
"gtcars"
167171

168172
#' Daily S&P 500 Index data from 1950 to 2015
@@ -194,6 +198,8 @@
194198
#' @section Dataset Introduced:
195199
#' `v0.2.0.5` (March 31, 2020)
196200
#'
201+
#' @examples
202+
#' dplyr::glimpse(sp500)
197203
"sp500"
198204

199205
#' A year of pizza sales from a pizza place
@@ -324,6 +330,8 @@
324330
#' @section Dataset Introduced:
325331
#' `v0.2.0.5` (March 31, 2020)
326332
#'
333+
#' @examples
334+
#' dplyr::glimpse(pizzaplace)
327335
"pizzaplace"
328336

329337
#' A toy example tibble for testing with gt: exibble
@@ -366,6 +374,8 @@
366374
#' @section Dataset Introduced:
367375
#' `v0.2.0.5` (March 31, 2020)
368376
#'
377+
#' @examples
378+
#' exibble
369379
"exibble"
370380

371381
#' Populations of all municipalities in Ontario from 1996 to 2021
@@ -432,6 +442,8 @@
432442
#' @section Dataset Introduced:
433443
#' `v0.9.0` (Mar 31, 2023)
434444
#'
445+
#' @examples
446+
#' dplyr::glimpse(towny)
435447
"towny"
436448

437449
#' A table of personal information for people all over the world
@@ -482,6 +494,8 @@
482494
#' @section Dataset Introduced:
483495
#' `v0.11.0` (July 9, 2024)
484496
#'
497+
#' @examples
498+
#' dplyr::glimpse(peeps)
485499
"peeps"
486500

487501

@@ -528,6 +542,8 @@
528542
#' @section Dataset Introduced:
529543
#' `v0.11.0` (July 9, 2024)
530544
#'
545+
#' @examples
546+
#' dplyr::glimpse(films)
531547
"films"
532548

533549
#' The stations of the Paris Metro
@@ -595,6 +611,8 @@
595611
#' @section Dataset Introduced:
596612
#' `v0.9.0` (Mar 31, 2023)
597613
#'
614+
#' @examples
615+
#' dplyr::glimpse(metro)
598616
"metro"
599617

600618
#' Weather conditions in Gibraltar, May 2023
@@ -633,6 +651,8 @@
633651
#' @section Dataset Introduced:
634652
#' `v0.11.0` (July 9, 2024)
635653
#'
654+
#' @examples
655+
#' dplyr::glimpse(gibraltar)
636656
"gibraltar"
637657

638658
#' The fundamental physical constants
@@ -674,6 +694,8 @@
674694
#' @section Dataset Introduced:
675695
#' `v0.10.0` (October 7, 2023)
676696
#'
697+
#' @examples
698+
#' dplyr::glimpse(constants)
677699
"constants"
678700

679701
#' Lab tests for one suffering from an illness
@@ -759,6 +781,8 @@
759781
#' @section Dataset Introduced:
760782
#' `v0.10.0` (October 7, 2023)
761783
#'
784+
#' @examples
785+
#' dplyr::glimpse(illness)
762786
"illness"
763787

764788
#' Reaction rates for gas-phase atmospheric reactions of organic compounds
@@ -855,6 +879,8 @@
855879
#' @section Dataset Introduced:
856880
#' `v0.11.0` (July 9, 2024)
857881
#'
882+
#' @examples
883+
#' dplyr::glimpse(reactions)
858884
"reactions"
859885

860886
#' Data on photolysis rates for gas-phase organic compounds
@@ -906,6 +932,8 @@
906932
#' @section Dataset Introduced:
907933
#' `v0.11.0` (July 9, 2024)
908934
#'
935+
#' @examples
936+
#' dplyr::glimpse(photolysis)
909937
"photolysis"
910938

911939
#' Nuclide data
@@ -959,6 +987,8 @@
959987
#' @section Dataset Introduced:
960988
#' `v0.11.0` (July 9, 2024)
961989
#'
990+
#' @examples
991+
#' dplyr::glimpse(nuclides)
962992
"nuclides"
963993

964994
#' An ADSL-flavored clinical trial toy dataset
@@ -1021,6 +1051,8 @@
10211051
#' @section Dataset Introduced:
10221052
#' `v0.9.0` (Mar 31, 2023)
10231053
#'
1054+
#' @examples
1055+
#' dplyr::glimpse(rx_adsl)
10241056
"rx_adsl"
10251057

10261058
#' An ADDV-flavored clinical trial toy dataset
@@ -1086,4 +1118,6 @@
10861118
#' @section Dataset Introduced:
10871119
#' `v0.9.0` (Mar 31, 2023)
10881120
#'
1121+
#' @examples
1122+
#' dplyr::glimpse(rx_addv)
10891123
"rx_addv"

R/tab_options.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#' elements: `heading.title`, `heading.subtitle`, `column_labels`,
106106
#' `row_group`, `footnotes`, and `source_notes`. Can be specified as a
107107
#' single-length character vector with units of pixels (e.g., `12px`) or as a
108-
#' percentage (e.g., `80\%`). If provided as a single-length numeric vector,
108+
#' percentage (e.g., `80%`). If provided as a single-length numeric vector,
109109
#' it is assumed that the value is given in units of pixels. The [px()] and
110110
#' [pct()] helper functions can also be used to pass in numeric values and
111111
#' obtain values as pixel or percentage units.

man/constants.Rd

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

man/exibble.Rd

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

man/films.Rd

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

man/gibraltar.Rd

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

man/grp_options.Rd

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

man/gtcars.Rd

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

man/illness.Rd

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

man/metro.Rd

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

0 commit comments

Comments
 (0)