Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Jan 30, 2024
1 parent 0359c10 commit 38314ce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 114 deletions.
4 changes: 1 addition & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ Depends:
R (>= 2.10)
Imports:
cli,
fs,
readr,
rlang
Suggests:
purrr
usethis
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Generated by roxygen2: do not edit by hand

export(copy_standalone_script)
50 changes: 0 additions & 50 deletions R/copy_standalone_script.R

This file was deleted.

6 changes: 3 additions & 3 deletions R/standalone-checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ check_scalar <- function(x, arg_name = rlang::caller_arg(x), call = parent.frame
check_range <- function(x,
range,
include_bounds = c(FALSE, FALSE),
arg_name = caller_arg(x),
arg_name = rlang::caller_arg(x),
scalar = FALSE,
msg = paste(
"The {.arg {arg_name}} argument must be in the interval",
Expand Down Expand Up @@ -165,8 +165,8 @@ check_range <- function(x,
#' @return invisible
#' @keywords internal
#' @noRd
check_binary <- function(x, arg_name = caller_arg(x), call = parent.frame()) {
if (!is.logical(x) && !(is_integerish(x) && is_empty(setdiff(x, c(0, 1, NA))))) {
check_binary <- function(x, arg_name = rlang::caller_arg(x), call = parent.frame()) {
if (!is.logical(x) && !(rlang::is_integerish(x) && rlang::is_empty(setdiff(x, c(0, 1, NA))))) {
paste(
"Expecting column {.arg {arg_name}} to be either {.cls logical}",
"or {.cls {c('numeric', 'integer')}} coded as {.val {c(0, 1)}}."
Expand Down
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,16 @@
[![R-CMD-check](https://github.com/ddsjoberg/standalone/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ddsjoberg/standalone/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of standalone is to provide standalone scripts that are useful for the
development of R packages. While you need to install this package to use the
interface to copy scripts into your package, the standalone package does not need to be a dependency of the package you are developing.
The goal of standalone is to provide standalone scripts that are useful for the development of R packages.
The standalone package **will not** be a dependency of the package you are developing.
You don't even need to install it to use the standalone scripts housed in this repo.

## Installation

You can install **standalone** from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("ddsjoberg/standalone")
```

## Example

To copy a standalone script with useful checks against user inputs, run:

``` r
standalone::copy_standalone_script("standalone-checks")
usethis::use_standalone("ddsjoberg/standalone", file = "checks")
```

45 changes: 0 additions & 45 deletions man/copy_standalone_script.Rd

This file was deleted.

0 comments on commit 38314ce

Please sign in to comment.