R Under development (unstable) (2024-05-04 r86521 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. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(AcceptReject) Attaching package: 'AcceptReject' The following object is masked from 'package:stats': qqplot > > test_check("AcceptReject") Time: 0.004182816 seconds First observations: [,1] [1,] -0.4144731 [2,] 1.4798625 [3,] -0.8953479 [4,] 1.6286696 [5,] 0.6564436 [6,] 0.5275963 ── Accept-Reject Samples ─────────────────────────────────────────────────────── ℹ It's not necessary, but if you want to extract the observations, use as.vector(). ✔ Case: continuous ✔ Number of observations: 100000 ✔ c: 1.0167 ✔ Probability of acceptance (1/c): 0.9836 ✔ Observations: 1.3769 1.5274 -0.2198 -0.6322 -0.042 -0.2718 -1.6341 1.4046 0.3731 -0.7901... ✔ xlim = -4 4 ──────────────────────────────────────────────────────────────────────────────── ── Accept-Reject Samples ─────────────────────────────────────────────────────── ℹ It's not necessary, but if you want to extract the observations, use as.vector(). ✔ Case: continuous ✔ Number of observations: 1000 ✔ c: 3.1915 ✔ Probability of acceptance (1/c): 0.3133 ✔ Observations: 0.076 -0.1689 1.3247 0.6412 0.5069 1.2196 -0.968 -0.5771 -0.8826 0.9623... ✔ xlim = -4 4 ──────────────────────────────────────────────────────────────────────────────── ── Accept-Reject Samples ─────────────────────────────────────────────────────── ℹ It's not necessary, but if you want to extract the observations, use as.vector(). ✔ Case: continuous ✔ Number of observations: 100000 ✔ c: 1.5 ✔ Probability of acceptance (1/c): 0.6667 ✔ Observations: 0.5397 0.5446 0.2205 0.569 0.6177 0.6041 0.4008 0.4873 0.4869 0.8308... ✔ xlim = 0 1 ──────────────────────────────────────────────────────────────────────────────── ! Warning: f(1) is Inf. If f is defined for x >= 1, trying a upper limit might be better. ── Accept-Reject Samples ─────────────────────────────────────────────────────── ℹ It's not necessary, but if you want to extract the observations, use as.vector(). ✔ Case: continuous ✔ Number of observations: 100000 ✔ c: 39.1508 ✔ Probability of acceptance (1/c): 0.0255 ✔ Observations: 0.1178 0.6963 0.005 0.329 0.7795 0.0474 0.7713 0.1379 0.3708 0.9836... ✔ xlim = 0 1 ──────────────────────────────────────────────────────────────────────────────── [ FAIL 0 | WARN 0 | SKIP 0 | PASS 0 ] > > proc.time() user system elapsed 3.12 0.18 3.29