R Under development (unstable) (2024-05-02 r86512 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(phoenix) > set.seed(42) > inputs <- expand.grid(sbp = rnorm(n = 500, mean = 80, sd = 10), + dbp = rnorm(n = 500, mean = 55, sd = 11)) > > pkg <- with(inputs, map(sbp, dbp)) > > x1 <- with(inputs, 2/3 * dbp + 1/3 * sbp) > x2 <- with(inputs, dbp + (sbp - dbp) / 3) > > stopifnot(isTRUE(all.equal(x1, x2))) > stopifnot(isTRUE(all.equal(pkg, x1))) > stopifnot(isTRUE(all.equal(pkg, x2))) > > ################################################################################ > # End of File # > ################################################################################ > > proc.time() user system elapsed 0.17 0.01 0.18