Skip to content

Commit

Permalink
fix documentation issue for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
elbersb committed Jul 3, 2020
1 parent 6d7191f commit e6254bd
Show file tree
Hide file tree
Showing 58 changed files with 196 additions and 183 deletions.
4 changes: 3 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
This is the submission for version 1.0.2.
This is a resubmission for version 1.0.2.
Documentation issues have been fixed.

## Test environments

* local OS X, R 3.6.1
* CRAN win-builder: R-devel and R-release
* R-Hub: rhub::check_for_cran()
* ubuntu 14.04 (on travis-ci), R 3.6.1

## R CMD check results
Expand Down
15 changes: 13 additions & 2 deletions generate_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ library(glue)
library(tidylog)
library(dplyr)
library(tidyr)
library(stringr)

# get tidylog functions (not very elegant...)
conn <- file("NAMESPACE")
Expand All @@ -28,14 +29,15 @@ that prints information about the operation}
<args>
}
\\value{
see \\link[<package>]{<f>}
see \\link[<package><topic>]{<f>}
}
\\description{
Wrapper around <package>::<f>
that prints information about the operation
}"

tidylog_env <- environment(tidylog::tidylog)
html_links <- tools::findHTMLlinks(level = 0:5)

for (f in functions) {
if (f %in% functions_dplyr) {
Expand All @@ -45,9 +47,18 @@ for (f in functions) {
} else {
next
}
# find topic
topic <- html_links[str_detect(html_links, package) & names(html_links) == f]
topic <- str_match(topic, "/([^/]*)\\.html")[, 2]
if (length(topic) == 0) {
topic <- ""
} else {
topic <- paste0(":", topic)
}

args_list <- names(formals(f, tidylog_env))
usage <- glue("{f}({paste(args_list, collapse = ', ')})")
args <- glue("\\item{<args_list>}{see \\link[<package>]{<f>}}", .open = "<", .close = ">")
args <- glue("\\item{<args_list>}{see \\link[<package><topic>]{<f>}}", .open = "<", .close = ">")
args <- paste0(args, collapse = "\n\n")

doc <- glue(template, .open = "<", .close = ">")
Expand Down
6 changes: 3 additions & 3 deletions man/add_count.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
add_count(x, ...)
}
\arguments{
\item{x}{see \link[dplyr]{add_count}}
\item{x}{see \link[dplyr:count]{add_count}}

\item{...}{see \link[dplyr]{add_count}}
\item{...}{see \link[dplyr:count]{add_count}}
}
\value{
see \link[dplyr]{add_count}
see \link[dplyr:count]{add_count}
}
\description{
Wrapper around dplyr::add_count
Expand Down
6 changes: 3 additions & 3 deletions man/add_tally.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
add_tally(x, ...)
}
\arguments{
\item{x}{see \link[dplyr]{add_tally}}
\item{x}{see \link[dplyr:count]{add_tally}}

\item{...}{see \link[dplyr]{add_tally}}
\item{...}{see \link[dplyr:count]{add_tally}}
}
\value{
see \link[dplyr]{add_tally}
see \link[dplyr:count]{add_tally}
}
\description{
Wrapper around dplyr::add_tally
Expand Down
10 changes: 5 additions & 5 deletions man/anti_join.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ that prints information about the operation}
anti_join(x, y, by, ...)
}
\arguments{
\item{x}{see \link[dplyr]{anti_join}}
\item{x}{see \link[dplyr:filter-joins]{anti_join}}

\item{y}{see \link[dplyr]{anti_join}}
\item{y}{see \link[dplyr:filter-joins]{anti_join}}

\item{by}{see \link[dplyr]{anti_join}}
\item{by}{see \link[dplyr:filter-joins]{anti_join}}

\item{...}{see \link[dplyr]{anti_join}}
\item{...}{see \link[dplyr:filter-joins]{anti_join}}
}
\value{
see \link[dplyr]{anti_join}
see \link[dplyr:filter-joins]{anti_join}
}
\description{
Wrapper around dplyr::anti_join
Expand Down
6 changes: 3 additions & 3 deletions man/distinct.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
distinct(.data, ...)
}
\arguments{
\item{.data}{see \link[dplyr]{distinct}}
\item{.data}{see \link[dplyr:distinct]{distinct}}

\item{...}{see \link[dplyr]{distinct}}
\item{...}{see \link[dplyr:distinct]{distinct}}
}
\value{
see \link[dplyr]{distinct}
see \link[dplyr:distinct]{distinct}
}
\description{
Wrapper around dplyr::distinct
Expand Down
6 changes: 3 additions & 3 deletions man/distinct_all.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
distinct_all(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{distinct_all}}
\item{.tbl}{see \link[dplyr:distinct_all]{distinct_all}}

\item{...}{see \link[dplyr]{distinct_all}}
\item{...}{see \link[dplyr:distinct_all]{distinct_all}}
}
\value{
see \link[dplyr]{distinct_all}
see \link[dplyr:distinct_all]{distinct_all}
}
\description{
Wrapper around dplyr::distinct_all
Expand Down
6 changes: 3 additions & 3 deletions man/distinct_at.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
distinct_at(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{distinct_at}}
\item{.tbl}{see \link[dplyr:distinct_all]{distinct_at}}

\item{...}{see \link[dplyr]{distinct_at}}
\item{...}{see \link[dplyr:distinct_all]{distinct_at}}
}
\value{
see \link[dplyr]{distinct_at}
see \link[dplyr:distinct_all]{distinct_at}
}
\description{
Wrapper around dplyr::distinct_at
Expand Down
6 changes: 3 additions & 3 deletions man/distinct_if.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
distinct_if(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{distinct_if}}
\item{.tbl}{see \link[dplyr:distinct_all]{distinct_if}}

\item{...}{see \link[dplyr]{distinct_if}}
\item{...}{see \link[dplyr:distinct_all]{distinct_if}}
}
\value{
see \link[dplyr]{distinct_if}
see \link[dplyr:distinct_all]{distinct_if}
}
\description{
Wrapper around dplyr::distinct_if
Expand Down
6 changes: 3 additions & 3 deletions man/filter_all.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
filter_all(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{filter_all}}
\item{.tbl}{see \link[dplyr:filter_all]{filter_all}}

\item{...}{see \link[dplyr]{filter_all}}
\item{...}{see \link[dplyr:filter_all]{filter_all}}
}
\value{
see \link[dplyr]{filter_all}
see \link[dplyr:filter_all]{filter_all}
}
\description{
Wrapper around dplyr::filter_all
Expand Down
6 changes: 3 additions & 3 deletions man/filter_at.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
filter_at(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{filter_at}}
\item{.tbl}{see \link[dplyr:filter_all]{filter_at}}

\item{...}{see \link[dplyr]{filter_at}}
\item{...}{see \link[dplyr:filter_all]{filter_at}}
}
\value{
see \link[dplyr]{filter_at}
see \link[dplyr:filter_all]{filter_at}
}
\description{
Wrapper around dplyr::filter_at
Expand Down
6 changes: 3 additions & 3 deletions man/filter_if.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
filter_if(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{filter_if}}
\item{.tbl}{see \link[dplyr:filter_all]{filter_if}}

\item{...}{see \link[dplyr]{filter_if}}
\item{...}{see \link[dplyr:filter_all]{filter_if}}
}
\value{
see \link[dplyr]{filter_if}
see \link[dplyr:filter_all]{filter_if}
}
\description{
Wrapper around dplyr::filter_if
Expand Down
10 changes: 5 additions & 5 deletions man/full_join.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ that prints information about the operation}
full_join(x, y, by, ...)
}
\arguments{
\item{x}{see \link[dplyr]{full_join}}
\item{x}{see \link[dplyr:mutate-joins]{full_join}}

\item{y}{see \link[dplyr]{full_join}}
\item{y}{see \link[dplyr:mutate-joins]{full_join}}

\item{by}{see \link[dplyr]{full_join}}
\item{by}{see \link[dplyr:mutate-joins]{full_join}}

\item{...}{see \link[dplyr]{full_join}}
\item{...}{see \link[dplyr:mutate-joins]{full_join}}
}
\value{
see \link[dplyr]{full_join}
see \link[dplyr:mutate-joins]{full_join}
}
\description{
Wrapper around dplyr::full_join
Expand Down
6 changes: 3 additions & 3 deletions man/group_by.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
group_by(.data, ...)
}
\arguments{
\item{.data}{see \link[dplyr]{group_by}}
\item{.data}{see \link[dplyr:group_by]{group_by}}

\item{...}{see \link[dplyr]{group_by}}
\item{...}{see \link[dplyr:group_by]{group_by}}
}
\value{
see \link[dplyr]{group_by}
see \link[dplyr:group_by]{group_by}
}
\description{
Wrapper around dplyr::group_by
Expand Down
6 changes: 3 additions & 3 deletions man/group_by_all.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
group_by_all(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{group_by_all}}
\item{.tbl}{see \link[dplyr:group_by_all]{group_by_all}}

\item{...}{see \link[dplyr]{group_by_all}}
\item{...}{see \link[dplyr:group_by_all]{group_by_all}}
}
\value{
see \link[dplyr]{group_by_all}
see \link[dplyr:group_by_all]{group_by_all}
}
\description{
Wrapper around dplyr::group_by_all
Expand Down
6 changes: 3 additions & 3 deletions man/group_by_at.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
group_by_at(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{group_by_at}}
\item{.tbl}{see \link[dplyr:group_by_all]{group_by_at}}

\item{...}{see \link[dplyr]{group_by_at}}
\item{...}{see \link[dplyr:group_by_all]{group_by_at}}
}
\value{
see \link[dplyr]{group_by_at}
see \link[dplyr:group_by_all]{group_by_at}
}
\description{
Wrapper around dplyr::group_by_at
Expand Down
6 changes: 3 additions & 3 deletions man/group_by_if.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
group_by_if(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{group_by_if}}
\item{.tbl}{see \link[dplyr:group_by_all]{group_by_if}}

\item{...}{see \link[dplyr]{group_by_if}}
\item{...}{see \link[dplyr:group_by_all]{group_by_if}}
}
\value{
see \link[dplyr]{group_by_if}
see \link[dplyr:group_by_all]{group_by_if}
}
\description{
Wrapper around dplyr::group_by_if
Expand Down
10 changes: 5 additions & 5 deletions man/inner_join.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ that prints information about the operation}
inner_join(x, y, by, ...)
}
\arguments{
\item{x}{see \link[dplyr]{inner_join}}
\item{x}{see \link[dplyr:mutate-joins]{inner_join}}

\item{y}{see \link[dplyr]{inner_join}}
\item{y}{see \link[dplyr:mutate-joins]{inner_join}}

\item{by}{see \link[dplyr]{inner_join}}
\item{by}{see \link[dplyr:mutate-joins]{inner_join}}

\item{...}{see \link[dplyr]{inner_join}}
\item{...}{see \link[dplyr:mutate-joins]{inner_join}}
}
\value{
see \link[dplyr]{inner_join}
see \link[dplyr:mutate-joins]{inner_join}
}
\description{
Wrapper around dplyr::inner_join
Expand Down
10 changes: 5 additions & 5 deletions man/left_join.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ that prints information about the operation}
left_join(x, y, by, ...)
}
\arguments{
\item{x}{see \link[dplyr]{left_join}}
\item{x}{see \link[dplyr:mutate-joins]{left_join}}

\item{y}{see \link[dplyr]{left_join}}
\item{y}{see \link[dplyr:mutate-joins]{left_join}}

\item{by}{see \link[dplyr]{left_join}}
\item{by}{see \link[dplyr:mutate-joins]{left_join}}

\item{...}{see \link[dplyr]{left_join}}
\item{...}{see \link[dplyr:mutate-joins]{left_join}}
}
\value{
see \link[dplyr]{left_join}
see \link[dplyr:mutate-joins]{left_join}
}
\description{
Wrapper around dplyr::left_join
Expand Down
6 changes: 3 additions & 3 deletions man/mutate.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
mutate(.data, ...)
}
\arguments{
\item{.data}{see \link[dplyr]{mutate}}
\item{.data}{see \link[dplyr:mutate]{mutate}}

\item{...}{see \link[dplyr]{mutate}}
\item{...}{see \link[dplyr:mutate]{mutate}}
}
\value{
see \link[dplyr]{mutate}
see \link[dplyr:mutate]{mutate}
}
\description{
Wrapper around dplyr::mutate
Expand Down
6 changes: 3 additions & 3 deletions man/mutate_all.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ that prints information about the operation}
mutate_all(.tbl, ...)
}
\arguments{
\item{.tbl}{see \link[dplyr]{mutate_all}}
\item{.tbl}{see \link[dplyr:mutate_all]{mutate_all}}

\item{...}{see \link[dplyr]{mutate_all}}
\item{...}{see \link[dplyr:mutate_all]{mutate_all}}
}
\value{
see \link[dplyr]{mutate_all}
see \link[dplyr:mutate_all]{mutate_all}
}
\description{
Wrapper around dplyr::mutate_all
Expand Down
Loading

0 comments on commit e6254bd

Please sign in to comment.