Skip to content

Commit 354e6df

Browse files
committed
markdownify documentation
1 parent 9c5e890 commit 354e6df

32 files changed

+402
-388
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Package: mdsr
2-
Date: 2024-04-26
32
Title: Complement to 'Modern Data Science with R'
43
Version: 0.2.9
54
Authors@R: c(
@@ -54,7 +53,8 @@ Suggests:
5453
sf,
5554
testthat,
5655
utf8
57-
RoxygenNote: 7.3.1
56+
Roxygen: list(markdown = TRUE)
57+
RoxygenNote: 7.3.2
5858
Encoding: UTF-8
5959
URL: https://github.com/mdsr-book/mdsr
6060
BugReports: https://github.com/mdsr-book/mdsr/issues

R/BabynameDist.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ globalVariables(c("x", "lx", "ex", "year", "sex", "age_today", "alive_prob", "li
33
#' Wrangle babynames data
44
#' @import dplyr
55
#' @export
6-
#' @return a \code{\link[dplyr]{tbl_df}} similar to \code{\link[babynames]{babynames}}
6+
#' @return a [tibble::tbl_df] similar to [babynames::babynames]
77
#' with a column for the estimated number of people alive in 2014.
88
#' @examples
99
#'

R/NCI60.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#' Load the NCI60 data from GitHub
22
#' @export
3+
#' @returns A [tibble::tbl_df]
34
#' @examples
45
#'
5-
#' \dontrun{
6+
#' \donttest{
7+
#' # The file is 5.0 MB
68
#' NCI60 <- etl_NCI60()
79
#' }
810

R/data.R

Lines changed: 140 additions & 145 deletions
Large diffs are not rendered by default.

R/macros.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#' Replacements for LaTeX macros
22
#' @name macros
3+
#' @details
4+
#' These functions are used by the authors to write the book, and are not
5+
#' intended for users.
6+
#'
37
#' @export
8+
#' @keywords internal
49
#' @param x text to wrap in macro
510
#' @param index add LaTeX indexing?
611
#' @examples
@@ -89,7 +94,7 @@ mdsr_person <- function(x, ...) {
8994

9095
#' @rdname macros
9196
#' @export
92-
#' @param ... arguments passed to \code{\link{index_entry}}
97+
#' @param ... arguments passed to [index_entry()]
9398
#' @examples
9499
#' vocab(x = "Big data", .f = tolower)
95100
vocab <- function(x, ...) {
@@ -101,7 +106,7 @@ vocab <- function(x, ...) {
101106
#' @rdname macros
102107
#' @param index_label the name of the index
103108
#' @param emph Display the LaTeX entry in italics
104-
#' @param .f function to apply to \code{\link{x}} during indexing
109+
#' @param .f function to apply to `x` during indexing
105110
#' @param alt alternate character string to use for indexing
106111
#' @export
107112
#' @examples

R/scidb.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#' src_scidb
22
#' @description Connect to the scidb server on Amazon Web Services.
33
#' @param dbname the name of the database to which you want to connect
4-
#' @param ... arguments passed to \code{\link[dbplyr]{src_dbi}} or \code{\link[DBI]{dbConnect}}
4+
#' @param ... arguments passed to [dbplyr::src_dbi()] or [DBI::dbConnect()]
55
#' @details This is a public, read-only account. Any abuse will be considered a
66
#' hostile act.
7-
#' @return For \code{\link{src_scidb}}, a \code{\link[dbplyr]{src_dbi}} object
8-
#' @seealso \code{\link[dbplyr]{src_dbi}}
7+
#' @return For [src_scidb()], a [dbplyr::src_dbi] object
8+
#' @seealso [dbplyr::src_dbi()]
99
#' @export
1010
#' @examples
1111
#' \dontrun{
@@ -19,8 +19,8 @@ src_scidb <- function(dbname, ...) {
1919

2020
#' @rdname src_scidb
2121
#' @export
22-
#' @return For \code{\link{dbConnect_scidb}}, a \code{\link[RMariaDB]{MariaDBConnection-class}} object
23-
#' @seealso \code{\link[RMariaDB]{MariaDBConnection-class}}
22+
#' @return For [dbConnect_scidb()], a [RMariaDB::MariaDBConnection-class] object
23+
#' @seealso [RMariaDB::MariaDBConnection-class]
2424
#' @examples
2525
#' \dontrun{
2626
#' db_air <- dbConnect_scidb("airlines")
@@ -43,9 +43,9 @@ dbConnect_scidb <- function(dbname, ...) {
4343
#' @rdname src_scidb
4444
#' @export
4545
#'
46-
#' @return For \code{\link{mysql_scidb}}, a character vector of length 1 to be used
47-
#' as an \code{engine.ops} argument, or on the command line.
48-
#' @seealso \code{\link[knitr]{opts_chunk}}
46+
#' @return For [mysql_scidb()], a character vector of length 1 to be used
47+
#' as an `engine.ops` argument, or on the command line.
48+
#' @seealso [knitr::opts_chunk()]
4949
#' @examples
5050
#'
5151
#' if (require(knitr)) {

R/themes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ skim <- function(data, ...) {
5555
#' Custom table output
5656
#' @export
5757
#' @param x A data.frame
58-
#' @param ... arguments passed to \code{\link[kableExtra]{kbl}}
58+
#' @param ... arguments passed to [kableExtra::kbl()]
5959
#' @examples
6060
#' mdsr_table(faithful)
6161

R/webshot.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
#' @param map A leaflet map object
33
#' @param path_to_img A path to the image file to save
44
#' @param overwrite Do you want to clobber any existing file?
5-
#' @param vwidth see \code{\link[webshot2]{webshot}}
6-
#' @param vheight see \code{\link[webshot2]{webshot}}
7-
#' @param cliprect see \code{\link[webshot2]{webshot}}
8-
#' @param ... arguments passed to \code{\link[webshot2]{webshot}}
5+
#' @inheritParams webshot2::webshot
6+
#' @param ... arguments passed to [webshot2::webshot()]
97
#' @export
108
#' @return a path to a PNG file
119
#' @examples

man/CIACountries.Rd

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

man/Cherry.Rd

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

0 commit comments

Comments
 (0)