Skip to content

Commit 706daf0

Browse files
committed
update 6012026
1 parent e9ad797 commit 706daf0

68 files changed

Lines changed: 575 additions & 402 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Description: Integer sequences from OEIS in R.
1313
Depends: R (>= 3.3.3)
1414
License: MIT + file LICENSE
1515
Encoding: UTF-8
16-
RoxygenNote: 7.2.3
16+
RoxygenNote: 7.3.0
1717
Imports:
1818
xml2,
1919
rvest,
@@ -28,3 +28,4 @@ Suggests:
2828
qpdf,
2929
covr
3030
VignetteBuilder: knitr
31+
Roxygen: list(markdown = TRUE)

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ S3method(OEIS_url,character)
101101
S3method(OEIS_xml,OEIS_ID)
102102
S3method(OEIS_xml,character)
103103
S3method(plot,OEIS_sequence)
104+
export("%>%")
104105
export(OEIS_ID)
105106
export(OEIS_author)
106107
export(OEIS_bfile)

OEIS.R.Rproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ PackageUseDevtools: Yes
2020
PackageInstallArgs: --no-multiarch --with-keep.source
2121
PackageCheckArgs: --as-cran
2222
PackageRoxygenize: rd,collate,namespace
23+
24+
SpellingDictionary: en_US

R/OEIS_ID.R

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,30 @@
88
# ---------------------------------------------------------------------------
99

1010
# OEIS_ID
11-
#' OEIS sequence authors from \code{internal format}, or from the sequence
12-
#' \code{ID}.
11+
#' OEIS sequence authors from `internal format`, or from the sequence
12+
#' `ID`.
1313
#'
1414
#' This function gives the name of the person, or persons, who contributed the
1515
#' sequence and their emails, if they are present and selected.
1616
#' @param x can be one of the following:
17-
#' * A character string with sequence \code{ID}.
18-
#' * A \code{OEIS_internal} S3 class object, with sequence internal format.
19-
#' * A S3 classes object \code{OEIS_xml} and \code{xml_document}, with
17+
#' * A character string with sequence `ID`.
18+
#' * A `OEIS_internal` S3 class object, with sequence internal format.
19+
#' * A S3 classes object `OEIS_xml` and `xml_document`, with
2020
#' sequence content from OEIS web.
21-
#' * An object of \code{OEIS_sequence} class, that contains all sequence
21+
#' * An object of `OEIS_sequence` class, that contains all sequence
2222
#' related data.
23-
#' * An object of \code{OEIS_bfile} class.
23+
#' * An object of `OEIS_bfile` class.
2424
#' @md
2525
#'
26-
#' @importFrom magrittr "%>%"
2726
#' @importFrom magrittr add
2827
#' @importFrom magrittr add extract2
2928
#'
30-
#' @seealso * \code{\link{OEIS_description}}
31-
#' @seealso * \code{\link{OEIS_internal_format}}
32-
#' @seealso * \code{\link{OEIS_sequence}}
33-
#' @seealso * \code{\link{OEIS_check}}
29+
#' @seealso * [OEIS_description()]
30+
#' @seealso * [OEIS_internal_format()]
31+
#' @seealso * [OEIS_sequence()]
32+
#' @seealso * [OEIS_check()]
3433
#'
35-
#' @return A character string with the OEIS sequence \code{ID}.
34+
#' @return A character string with the OEIS sequence `ID`.
3635
#'
3736
#' @examples
3837
#' id <- "A169890"

R/OEIS_author.R

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@
88
# ---------------------------------------------------------------------------
99

1010
# OEIS_author
11-
#' OEIS sequence authors from \code{internal format}, or from the sequence
12-
#' \code{ID}.
11+
#' OEIS sequence authors from `internal format`, or from the sequence
12+
#' `ID`.
1313
#'
1414
#' This function gives the name of the person, or persons, who contributed the
1515
#' sequence and their emails, if they are present and selected.
1616
#' @inheritParams OEIS_description
17-
#' @param email A logical, by specifying: \code{email = TRUE}, the
17+
#' @param email A logical, by specifying: `email = TRUE`, the
1818
#' author's email is returned, if present, with the author's name.
19-
#' The default value of \code{email} is \code{FALSE}.
19+
#' The default value of `email` is `FALSE`.
2020
#'
21-
#' @importFrom magrittr "%>%"
22-
#' @importFrom magrittr "%<>%"
21+
#' @importFrom magrittr %<>%
2322
#'
24-
#' @seealso * \code{\link{OEIS_description}}
25-
#' @seealso * \code{\link{OEIS_internal_format}}
26-
#' @seealso * \code{\link{OEIS_sequence}}
27-
#' @seealso * \code{\link{OEIS_check}}
23+
#' @seealso * [OEIS_description()]
24+
#' @seealso * [OEIS_internal_format()]
25+
#' @seealso * [OEIS_sequence()]
26+
#' @seealso * [OEIS_check()]
2827
#'
2928
#' @return A character vector with the OEIS sequence authors and emails.
3029
#'

R/OEIS_bfile.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,27 @@
88
# ---------------------------------------------------------------------------
99

1010
# OEIS_bfile
11-
#' S3 class constructor for \code{bfile} data.
11+
#' S3 class constructor for `bfile` data.
1212
#'
13-
#' A \code{bfile} is a text formatted file that provides many more terms of a
13+
#' A `bfile` is a text formatted file that provides many more terms of a
1414
#' sequence than the typical fifty to eighty terms that can be shown in the main
1515
#' sequence entry.
16-
#' @param ID A character string or an object of the class \code{OEIS_ID}
16+
#' @param ID A character string or an object of the class `OEIS_ID`
1717
#'
1818
#' @importFrom utils read.table
19-
#' @importFrom magrittr "%>%"
2019
#' @md
21-
#' @return A S3 object of the class \code{OEIS_bfile} with the following structure:
20+
#' @return A S3 object of the class `OEIS_bfile` with the following structure:
2221
#' * __bfile_name__: Name of `bfile`.
2322
#' * __bfile_url__: Url to `bfile` in the OEIS server.
2423
#' * __min_n__: Minimum `n` position of the first term for available values of the sequence.
2524
#' * __max_n__: Maximum `n` position of the last term for available values of the sequence.
2625
#' * __comments__: Text comments included into the `bfile`
2726
#' * __data__: A data frame including all data within the `bfile` with two
2827
#' columns: __n__ and other named as the sequence `ID` including sequence values for __a(n)__.
29-
#' @seealso * \code{\link{OEIS_bfile_url}}
30-
#' @seealso * \code{\link{OEIS_sequence}}
31-
#' @seealso * \code{\link{OEIS_check}}
32-
#' @seealso * \code{\link{OEIS_download_bfile}}
28+
#' @seealso * [OEIS_bfile_url()]
29+
#' @seealso * [OEIS_sequence()]
30+
#' @seealso * [OEIS_check()]
31+
#' @seealso * [OEIS_download_bfile()]
3332
#'
3433
#' @examples
3534
#' id <- "A000056"

R/OEIS_bfile_url.R

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@
88
# ---------------------------------------------------------------------------
99

1010
# OEIS_bfile_url
11-
#' Get sequence data url in \code{bfile} format.
11+
#' Get sequence data url in `bfile` format.
1212
#'
13-
#' A \strong{bfile} is a text formatted file that provides many more terms of a
13+
#' A **bfile** is a text formatted file that provides many more terms of a
1414
#' sequence than the typical fifty to eighty terms that can be shown in the main
1515
#' sequence entry.
1616
#'
1717
#' @inheritParams OEIS_check
1818
#' @param URL A logical that selects if the output is the complete url, or just
19-
#' the \code{bfile} file name.
19+
#' the `bfile` file name.
2020
#'
21-
#' @importFrom magrittr "%>%"
2221
#'
23-
#' @return A string with the sequence \strong{bfile} url, or the \strong{bfile}
22+
#' @return A string with the sequence **bfile** url, or the **bfile**
2423
#' file name
2524
#'
26-
#' @seealso * \code{\link{OEIS_url}}
27-
#' @seealso * \code{\link{OEIS_check}}
25+
#' @seealso * [OEIS_url()]
26+
#' @seealso * [OEIS_check()]
2827
#' @export
2928
#'
3029
#' @examples

R/OEIS_bibtex.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ author_list <- function(x) {
3636

3737
#' Getting BibTeX citation from OEIS sequence
3838
#'
39-
#' @param x An object of class \code{OEIS_sequence}
39+
#' @param x An object of class `OEIS_sequence`
4040
#' @importFrom utils person
4141
#' @importFrom utils bibentry
4242
#' @md
@@ -56,17 +56,17 @@ author_list <- function(x) {
5656
#' @note Fields tags are separated by commas. The last tag finishes with a comma
5757
#' , although is not necessarily. The tag's name is not case-sensitive but
5858
#' caps are used.
59-
#' @note For more help on `bibentry` class, see: \code{\link[utils]{bibentry}}
59+
#' @note For more help on `bibentry` class, see: [utils::bibentry()]
6060
#'
61-
#' @seealso * \code{\link[utils]{person}}
62-
#' @seealso * \code{\link[utils]{toBibtex}}
63-
#' @seealso * \code{\link{OEIS_author}}
61+
#' @seealso * [utils::person()]
62+
#' @seealso * [utils::toBibtex()]
63+
#' @seealso * [OEIS_author()]
6464
#' @references
65-
#' * \href{http://www.bibtex.org/Format/}{BibTeX Format Description}
66-
#' * \href{http://psychedelic-geometry.blogspot.com.es/2010/02/bibtex-automatic-oeis-citations.html}{BibTeX AUTOMATIC OEIS CITATIONS}
67-
#' * \href{https://github.com/Psychedelic-Geometry/OEIS-Mathematica/wiki}{Mathematica OEIS Package}
68-
#' * \href{https://en.wikipedia.org/wiki/BibTeX}{Wikipedia: BibTex}
69-
#' * \href{https://oeis.org/wiki/Welcome#reference}{Referencing a Particular Sequence}
65+
#' * [BibTeX Format Description](http://www.bibtex.org/Format/)
66+
#' * [BibTeX AUTOMATIC OEIS CITATIONS](http://psychedelic-geometry.blogspot.com.es/2010/02/bibtex-automatic-oeis-citations.html)
67+
#' * [Mathematica OEIS Package](https://github.com/Psychedelic-Geometry/OEIS-Mathematica/wiki)
68+
#' * [Wikipedia: BibTex](https://en.wikipedia.org/wiki/BibTeX)
69+
#' * [Referencing a Particular Sequence](https://oeis.org/wiki/Welcome#reference)
7070
#' @export
7171
#'
7272
#' @examples

R/OEIS_check.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@
1010
# OEIS_check
1111
#' OEIS ID Validation
1212
#'
13-
#' @param ID A string with the OEIS sequence identifier \code{ID} number.
14-
#' The A-number or sequence \code{ID} is the absolute catalog number of the
13+
#' @param ID A string with the OEIS sequence identifier `ID` number.
14+
#' The A-number or sequence `ID` is the absolute catalog number of the
1515
#' sequence. It consists of "A" followed by 6 digits.
1616
#'
17-
#' @seealso * \code{\link{OEIS_url}}
18-
#' @seealso * \code{\link{OEIS_ID}}
17+
#' @seealso * [OEIS_url()]
18+
#' @seealso * [OEIS_ID()]
1919
#'
20-
#' @return An object of class \code{"OEIS_ID"} or an error if \code{ID} is not
20+
#' @return An object of class `"OEIS_ID"` or an error if `ID` is not
2121
#' an OEIS valid ID
2222
#' @export
2323
#'
2424
#' @examples
2525
#' OEIS_check("A002000")
26+
#'
2627
OEIS_check <- function(ID) {
2728
if (!grepl("^A\\d{6}$", ID)) {
2829
stop(paste0("\"", ID, "\" is not an OEIS valid ID"))

R/OEIS_comments.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@
88
# ---------------------------------------------------------------------------
99

1010
# OEIS_comments
11-
#' OEIS sequence comments lines from sequence \code{internal_format}
11+
#' OEIS sequence comments lines from sequence `internal_format`
1212
#'
1313
#' The comments field in OEIS sequence entries is for information that does
1414
#' not quite fit in other fields.
1515
#' @inheritParams OEIS_description
1616
#'
17-
#' @importFrom magrittr "%>%"
1817
#'
19-
#' @seealso * \code{\link{OEIS_description}}
20-
#' @seealso * \code{\link{OEIS_author}}
21-
#' @seealso * \code{\link{OEIS_internal_format}}
22-
#' @seealso * \code{\link{OEIS_formula}}
23-
#' @seealso * \code{\link{OEIS_sequence}}
24-
#' @seealso * \code{\link{OEIS_xml}}
18+
#' @seealso * [OEIS_description()]
19+
#' @seealso * [OEIS_author()]
20+
#' @seealso * [OEIS_internal_format()]
21+
#' @seealso * [OEIS_formula()]
22+
#' @seealso * [OEIS_sequence()]
23+
#' @seealso * [OEIS_xml()]
2524
#' @return A character string with the OEIS sequence comments lines from the
26-
#' sequence or \code{NULL} if there are no comments.
25+
#' sequence or `NULL` if there are no comments.
2726
#'
2827
#' @examples
2928
#' id <- "A105805"

0 commit comments

Comments
 (0)