Skip to content

Commit

Permalink
Move names around
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Dec 13, 2024
1 parent 93685e7 commit ab483b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ expit <- function(alpha, low = 0, high = 1) {
.rxTransform(alpha, 1.0, low, high, 4L, TRUE)
}


.logit <- function(x, low = 0, high=1) {
.x <- as.character(substitute(x))
.tmp <- suppressWarnings(try(force(x), silent = TRUE))
Expand All @@ -525,7 +526,7 @@ expit <- function(alpha, low = 0, high = 1) {
.high <- as.character(substitute(high))
.tmp <- suppressWarnings(try(force(high), silent = TRUE))
if (!inherits(.tmp, "try-error")) {
if (is.character(.tmp)) {
if (is.character(.tmp) || is.numeric(.tmp)) {
.high <- high
}
}
Expand All @@ -535,8 +536,8 @@ expit <- function(alpha, low = 0, high = 1) {
.expit <- function(x, low = 0, high=1) {
.x <- as.character(substitute(x))
.tmp <- suppressWarnings(try(force(x), silent = TRUE))
if (!inherits(.tmp, "try-error") || is.numeric(.tmp)) {
if (is.character(.tmp)) {
if (!inherits(.tmp, "try-error")) {
if (is.character(.tmp) || is.numeric(.tmp)) {
.x <- x
}
}
Expand Down

0 comments on commit ab483b6

Please sign in to comment.