R/rxrandomui.R

Defines functions .ribinom .ricauchy .richisq .riexp .rif .rigamma .ribeta .rigeom .riweibull .riunif .rit .ripois .rinorm .rxbinom .rxcauchy .rxchisq .rxexp .rxf .rxgamma .rxbeta .rxgeom .rxweibull .rxunif .rxt .rxpois .rxnorm

# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxnorm <- function(mean = 0, sd = 1) {
    .mean <- as.character(substitute(mean))
    .tmp <- suppressWarnings(try(force(mean), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .mean <- mean
        }
    }
    .sd <- as.character(substitute(sd))
    .tmp <- suppressWarnings(try(force(sd), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .sd <- sd
        }
    }
    list(replace = paste0("rxnorm(", .mean, ", ", .sd, ")"))
}

#'@export
rxUdfUi.rxnorm <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxpois <- function(lambda) {
    .lambda <- as.character(substitute(lambda))
    .tmp <- suppressWarnings(try(force(lambda), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .lambda <- lambda
        }
    }
    list(replace = paste0("rxpois(", .lambda, ")"))
}

#'@export
rxUdfUi.rxpois <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxt <- function(df) {
    .df <- as.character(substitute(df))
    .tmp <- suppressWarnings(try(force(df), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df <- df
        }
    }
    list(replace = paste0("rxt(", .df, ")"))
}

#'@export
rxUdfUi.rxt <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxunif <- function(min = 0, max = 1) {
    .min <- as.character(substitute(min))
    .tmp <- suppressWarnings(try(force(min), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .min <- min
        }
    }
    .max <- as.character(substitute(max))
    .tmp <- suppressWarnings(try(force(max), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .max <- max
        }
    }
    list(replace = paste0("rxunif(", .min, ", ", .max, ")"))
}

#'@export
rxUdfUi.rxunif <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxweibull <- function(shape, scale = 1) {
    .shape <- as.character(substitute(shape))
    .tmp <- suppressWarnings(try(force(shape), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape <- shape
        }
    }
    .scale <- as.character(substitute(scale))
    .tmp <- suppressWarnings(try(force(scale), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .scale <- scale
        }
    }
    list(replace = paste0("rxweibull(", .shape, ", ", .scale, 
        ")"))
}

#'@export
rxUdfUi.rxweibull <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxgeom <- function(prob) {
    .prob <- as.character(substitute(prob))
    .tmp <- suppressWarnings(try(force(prob), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .prob <- prob
        }
    }
    list(replace = paste0("rxgeom(", .prob, ")"))
}

#'@export
rxUdfUi.rxgeom <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxbeta <- function(shape1, shape2) {
    .shape1 <- as.character(substitute(shape1))
    .tmp <- suppressWarnings(try(force(shape1), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape1 <- shape1
        }
    }
    .shape2 <- as.character(substitute(shape2))
    .tmp <- suppressWarnings(try(force(shape2), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape2 <- shape2
        }
    }
    list(replace = paste0("rxbeta(", .shape1, ", ", .shape2, 
        ")"))
}

#'@export
rxUdfUi.rxbeta <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxgamma <- function(shape, rate = 1) {
    .shape <- as.character(substitute(shape))
    .tmp <- suppressWarnings(try(force(shape), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape <- shape
        }
    }
    .rate <- as.character(substitute(rate))
    .tmp <- suppressWarnings(try(force(rate), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .rate <- rate
        }
    }
    list(replace = paste0("rxgamma(", .shape, ", ", .rate, ")"))
}

#'@export
rxUdfUi.rxgamma <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxf <- function(df1, df2) {
    .df1 <- as.character(substitute(df1))
    .tmp <- suppressWarnings(try(force(df1), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df1 <- df1
        }
    }
    .df2 <- as.character(substitute(df2))
    .tmp <- suppressWarnings(try(force(df2), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df2 <- df2
        }
    }
    list(replace = paste0("rxf(", .df1, ", ", .df2, ")"))
}

#'@export
rxUdfUi.rxf <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxexp <- function(rate) {
    .rate <- as.character(substitute(rate))
    .tmp <- suppressWarnings(try(force(rate), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .rate <- rate
        }
    }
    list(replace = paste0("rxexp(", .rate, ")"))
}

#'@export
rxUdfUi.rxexp <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxchisq <- function(df) {
    .df <- as.character(substitute(df))
    .tmp <- suppressWarnings(try(force(df), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df <- df
        }
    }
    list(replace = paste0("rxchisq(", .df, ")"))
}

#'@export
rxUdfUi.rxchisq <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxcauchy <- function(location = 0, scale = 1) {
    .location <- as.character(substitute(location))
    .tmp <- suppressWarnings(try(force(location), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .location <- location
        }
    }
    .scale <- as.character(substitute(scale))
    .tmp <- suppressWarnings(try(force(scale), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .scale <- scale
        }
    }
    list(replace = paste0("rxcauchy(", .location, ", ", .scale, 
        ")"))
}

#'@export
rxUdfUi.rxcauchy <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rxbinom <- function(size, prob) {
    .size <- as.character(substitute(size))
    .tmp <- suppressWarnings(try(force(size), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .size <- size
        }
    }
    .prob <- as.character(substitute(prob))
    .tmp <- suppressWarnings(try(force(prob), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .prob <- prob
        }
    }
    list(replace = paste0("rxbinom(", .size, ", ", .prob, ")"))
}

#'@export
rxUdfUi.rxbinom <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rinorm <- function(mean = 0, sd = 1) {
    .mean <- as.character(substitute(mean))
    .tmp <- suppressWarnings(try(force(mean), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .mean <- mean
        }
    }
    .sd <- as.character(substitute(sd))
    .tmp <- suppressWarnings(try(force(sd), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .sd <- sd
        }
    }
    list(replace = paste0("rinorm(", .mean, ", ", .sd, ")"))
}

#'@export
rxUdfUi.rinorm <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.ripois <- function(lambda) {
    .lambda <- as.character(substitute(lambda))
    .tmp <- suppressWarnings(try(force(lambda), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .lambda <- lambda
        }
    }
    list(replace = paste0("ripois(", .lambda, ")"))
}

#'@export
rxUdfUi.ripois <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rit <- function(df) {
    .df <- as.character(substitute(df))
    .tmp <- suppressWarnings(try(force(df), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df <- df
        }
    }
    list(replace = paste0("rit(", .df, ")"))
}

#'@export
rxUdfUi.rit <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.riunif <- function(min = 0, max = 1) {
    .min <- as.character(substitute(min))
    .tmp <- suppressWarnings(try(force(min), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .min <- min
        }
    }
    .max <- as.character(substitute(max))
    .tmp <- suppressWarnings(try(force(max), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .max <- max
        }
    }
    list(replace = paste0("riunif(", .min, ", ", .max, ")"))
}

#'@export
rxUdfUi.riunif <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.riweibull <- function(shape, scale = 1) {
    .shape <- as.character(substitute(shape))
    .tmp <- suppressWarnings(try(force(shape), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape <- shape
        }
    }
    .scale <- as.character(substitute(scale))
    .tmp <- suppressWarnings(try(force(scale), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .scale <- scale
        }
    }
    list(replace = paste0("riweibull(", .shape, ", ", .scale, 
        ")"))
}

#'@export
rxUdfUi.riweibull <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rigeom <- function(prob) {
    .prob <- as.character(substitute(prob))
    .tmp <- suppressWarnings(try(force(prob), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .prob <- prob
        }
    }
    list(replace = paste0("rigeom(", .prob, ")"))
}

#'@export
rxUdfUi.rigeom <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.ribeta <- function(shape1, shape2) {
    .shape1 <- as.character(substitute(shape1))
    .tmp <- suppressWarnings(try(force(shape1), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape1 <- shape1
        }
    }
    .shape2 <- as.character(substitute(shape2))
    .tmp <- suppressWarnings(try(force(shape2), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape2 <- shape2
        }
    }
    list(replace = paste0("ribeta(", .shape1, ", ", .shape2, 
        ")"))
}

#'@export
rxUdfUi.ribeta <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rigamma <- function(shape, rate = 1) {
    .shape <- as.character(substitute(shape))
    .tmp <- suppressWarnings(try(force(shape), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .shape <- shape
        }
    }
    .rate <- as.character(substitute(rate))
    .tmp <- suppressWarnings(try(force(rate), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .rate <- rate
        }
    }
    list(replace = paste0("rigamma(", .shape, ", ", .rate, ")"))
}

#'@export
rxUdfUi.rigamma <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.rif <- function(df1, df2) {
    .df1 <- as.character(substitute(df1))
    .tmp <- suppressWarnings(try(force(df1), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df1 <- df1
        }
    }
    .df2 <- as.character(substitute(df2))
    .tmp <- suppressWarnings(try(force(df2), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df2 <- df2
        }
    }
    list(replace = paste0("rif(", .df1, ", ", .df2, ")"))
}

#'@export
rxUdfUi.rif <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.riexp <- function(rate) {
    .rate <- as.character(substitute(rate))
    .tmp <- suppressWarnings(try(force(rate), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .rate <- rate
        }
    }
    list(replace = paste0("riexp(", .rate, ")"))
}

#'@export
rxUdfUi.riexp <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.richisq <- function(df) {
    .df <- as.character(substitute(df))
    .tmp <- suppressWarnings(try(force(df), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .df <- df
        }
    }
    list(replace = paste0("richisq(", .df, ")"))
}

#'@export
rxUdfUi.richisq <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.ricauchy <- function(location = 0, scale = 1) {
    .location <- as.character(substitute(location))
    .tmp <- suppressWarnings(try(force(location), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .location <- location
        }
    }
    .scale <- as.character(substitute(scale))
    .tmp <- suppressWarnings(try(force(scale), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .scale <- scale
        }
    }
    list(replace = paste0("ricauchy(", .location, ", ", .scale, 
        ")"))
}

#'@export
rxUdfUi.ricauchy <- rxUdfUi.rxpois

## nocov end
# This file is generated by .generateRandomUiFuns() in build.R
## nocov start
.ribinom <- function(size, prob) {
    .size <- as.character(substitute(size))
    .tmp <- suppressWarnings(try(force(size), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .size <- size
        }
    }
    .prob <- as.character(substitute(prob))
    .tmp <- suppressWarnings(try(force(prob), silent = TRUE))
    if (!inherits(.tmp, "try-error")) {
        if (is.character(.tmp)) {
            .prob <- prob
        }
    }
    list(replace = paste0("ribinom(", .size, ", ", .prob, ")"))
}

#'@export
rxUdfUi.ribinom <- rxUdfUi.rxpois

## nocov end

Try the rxode2 package in your browser

Any scripts or data that you put into this service are public.

rxode2 documentation built on Oct. 30, 2024, 9:06 a.m.