Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stbl 0.1 to CRAN #75

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^docs$
^pkgdown$
^exploration$
^CRAN-SUBMISSION$
15 changes: 7 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
Package: stbl
Title: Stabilize Function Arguments
Version: 0.0.0.9001
Authors@R:
person("Jon", "Harmon", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-4781-4346"))
Description: A set of consistent, opinionated functions to quickly check
function arguments, coerce them to the desired configuration, or deliver
informative error messages when that is not possible.
Version: 0.1.1
Authors@R: person("Jon", "Harmon", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-4781-4346"))
Description: A set of consistent, opinionated functions to quickly check
function arguments, coerce them to the desired configuration, or
deliver informative error messages when that is not possible.
License: MIT + file LICENSE
URL: https://github.com/jonthegeek/stbl,
https://jonthegeek.github.io/stbl/
BugReports: https://github.com/jonthegeek/stbl/issues
Imports:
Imports:
cli,
glue,
rlang (>= 1.1.0),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# stbl (development version)
# stbl 0.1.1

* Formatting changes in DESCRIPTION and examples.

# stbl 0.1.0

* Initial CRAN submission.
4 changes: 0 additions & 4 deletions R/stabilize_chr.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,16 @@
#' @export
#'
#' @examples
#' # to_chr()
#' to_chr("a")
#' to_chr(letters)
#' to_chr(1:10)
#' to_chr(1 + 0i)
#' to_chr(NULL)
#' try(to_chr(NULL, allow_null = FALSE))
#'
#' # to_chr_scalar()
#' to_chr_scalar("a")
#' try(to_chr_scalar(letters))
#'
#' # stabilize_chr()
#' stabilize_chr(letters)
#' stabilize_chr(1:10)
#' stabilize_chr(NULL)
Expand All @@ -51,7 +48,6 @@
#' try(stabilize_chr(letters, max_size = 20))
#' try(stabilize_chr(c("hide", "find", "find", "hide"), regex = "hide"))
#'
#' # stabilize_chr_scalar()
#' stabilize_chr_scalar(TRUE)
#' stabilize_chr_scalar("TRUE")
#' try(stabilize_chr_scalar(c(TRUE, FALSE, TRUE)))
Expand Down
4 changes: 0 additions & 4 deletions R/stabilize_fct.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,20 @@
#' @export
#'
#' @examples
#' # to_fct
#' to_fct("a")
#' to_fct(1:10)
#' to_fct(NULL)
#' try(to_fct(letters[1:5], levels = c("a", "c"), to_na = "b"))
#'
#' # to_fct_scalar
#' to_fct_scalar("a")
#' try(to_fct_scalar(letters))
#'
#' # stabilize_fct
#' stabilize_fct(letters)
#' try(stabilize_fct(NULL, allow_null = FALSE))
#' try(stabilize_fct(c("a", NA), allow_na = FALSE))
#' try(stabilize_fct(c("a", "b", "c"), min_size = 5))
#' try(stabilize_fct(c("a", "b", "c"), max_size = 2))
#'
#' # stabilize_fct_scalar
#' stabilize_fct_scalar("a")
#' try(stabilize_fct_scalar(letters))
#' try(stabilize_fct_scalar("c", levels = c("a", "b")))
Expand Down
4 changes: 0 additions & 4 deletions R/stabilize_int.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#' @export
#'
#' @examples
#' # to_int
#' to_int(1:10)
#' to_int("1")
#' to_int(1 + 0i)
Expand All @@ -35,11 +34,9 @@
#' try(to_int("1", coerce_character = FALSE))
#' try(to_int(c("1", "2", "3.1", "4", "5.2")))
#'
#' # to_int_scalar
#' to_int_scalar("1")
#' try(to_int_scalar(1:10))
#'
#' # stabilize_int
#' stabilize_int(1:10)
#' stabilize_int("1")
#' stabilize_int(1 + 0i)
Expand All @@ -53,7 +50,6 @@
#' try(stabilize_int(1:10, min_value = 3))
#' try(stabilize_int(1:10, max_value = 7))
#'
#' # stabilize_int_scalar
#' stabilize_int_scalar(1L)
#' stabilize_int_scalar("1")
#' try(stabilize_int_scalar(1:10))
Expand Down
4 changes: 0 additions & 4 deletions R/stabilize_lgl.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#' @export
#'
#' @examples
#' # to_lgl
#' to_lgl(TRUE)
#' to_lgl("TRUE")
#' to_lgl(1:10)
Expand All @@ -25,11 +24,9 @@
#' try(to_lgl(letters))
#' try(to_lgl(list(TRUE)))
#'
#' # to_lgl_scalar
#' to_lgl_scalar("TRUE")
#' try(to_lgl_scalar(c(TRUE, FALSE)))
#'
#' # stabilize_lgl
#' stabilize_lgl(c(TRUE, FALSE, TRUE))
#' stabilize_lgl("true")
#' stabilize_lgl(NULL)
Expand All @@ -39,7 +36,6 @@
#' try(stabilize_lgl(c(TRUE, FALSE, TRUE), min_size = 5))
#' try(stabilize_lgl(c(TRUE, FALSE, TRUE), max_size = 2))
#'
#' # stabilize_lgl_scalar
#' stabilize_lgl_scalar(TRUE)
#' stabilize_lgl_scalar("TRUE")
#' try(stabilize_lgl_scalar(c(TRUE, FALSE, TRUE)))
Expand Down
9 changes: 9 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Resubmission

This is a resubmission. In this version I have:

* Removed comment-separators from examples, to avoid the appearance of commented code.

* Attempted to format the DESCRIPTION to remove unnecessary spaces.


## R CMD check results

0 errors | 0 warnings | 1 note
Expand Down
4 changes: 0 additions & 4 deletions man/stabilize_chr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/stabilize_fct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/stabilize_int.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/stabilize_lgl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading