Skip to content

Commit

Permalink
R CMD check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brodieG committed Jan 3, 2024
1 parent 18fff94 commit 0c85f03
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ notcran
\.Rout.fail$
^\.github$
^revdep
^tmp$
4 changes: 2 additions & 2 deletions R/code-ifelse.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ code_gen_if <- function(...) {
#' are used, [subassign] (another internal representation function).
#' @export
#' @keywords internal
#' @rdname intermediate-representation
#' @name intermediate-representation
#' @aliases r2c_if if_true if_false if_test r2c_for for_init for_iter for_n
#' for_0 vcopy rec lset lcopy

Expand All @@ -133,5 +133,5 @@ if_false <- function(expr) expr
#' @keywords internal
#' @rdname intermediate-representation

if_test <- function(cond) expr
if_test <- function(cond) cond

4 changes: 2 additions & 2 deletions R/code-unary.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ NULL
#' @rdname intermediate-representation
#' @export

uplus <- function(e1) x
uplus <- function(e1) e1

#' @param e1 a logical or numeric vector
#' @rdname intermediate-representation
#' @export

uminus <- function(e1) -x
uminus <- function(e1) -e1

UOP.MAP <- c("-"="uminus", "+"="uplus")

Expand Down
2 changes: 1 addition & 1 deletion R/code.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ cgen <- function(

# Check-reorder constant formal params
if(length(icnst)) {
formals <- if(typeof(defn) == 'closure') formals(defn) else formals(closure)
formals <- if(typeof(defn) == 'closure') formals(defn) else formals(fun)
if(
(!all(names(icnst) %in% names(formals)) || "..." %in% names(icnst))
)
Expand Down
8 changes: 4 additions & 4 deletions R/compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ rand_string <- function(len, pool=c(letters, 0:9))
#' loss as double precision floating point. Platforms that support R and fail
#' this requirement are likely rare.
#'
#' Interrupts are supported at the [runner] level, e.g. _between_ groups or
#' windows, each time a preset number of elements has been processed since the
#' last interrupt check. There is infrastructure to support within
#' Interrupts are supported at the [runner][runners] level, e.g. _between_
#' groups or windows, each time a preset number of elements has been processed
#' since the last interrupt check. There is infrastructure to support within
#' iteration-interrupts, but it adds overhead when dealing with many iterations
#' with few elements each and thus is disabled at the moment.
#'
Expand Down Expand Up @@ -700,7 +700,7 @@ unload_r2c_dynlibs <- function(except=character()) {
unloaded <- try(dyn.unload(path), silent=TRUE)
if(inherits(unloaded, "try-error")) {
msg <- conditionMessage(attr(unloaded, 'condition'))
paste0("Failed to unload ", name, ": ", msg)
paste0("Failed to unload ", x, ": ", msg)
} else ""
},
""
Expand Down
2 changes: 1 addition & 1 deletion R/preprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ transform_control <- function(x, i=0L) {
) )
} else if (call.sym %in% c('repeat', 'while')) {
# BE SURE TO UPDATE `collect_loop_call_symbols` IF WE ADD THESE
stop("`", call.sym., "` unimplemented.")
stop("`", call.sym, "` unimplemented.")
}
}
x
Expand Down
1 change: 1 addition & 0 deletions man/intermediate-representation.Rd

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

6 changes: 3 additions & 3 deletions man/r2c-compile.Rd

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

2 changes: 1 addition & 1 deletion man/rolli_exec.Rd

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

0 comments on commit 0c85f03

Please sign in to comment.