CRAN Package Check Results for Maintainer ‘Mikael Jagan <jaganmn at mcmaster.ca>’

Last updated on 2024-06-27 16:49:30 CEST.

Package FAIL ERROR NOTE OK
epigrowthfit 3 4 6
fastbeta 13

Package epigrowthfit

Current CRAN status: FAIL: 3, ERROR: 4, NOTE: 6

Additional issues

M1mac

Version: 0.15.3
Check: tests
Result: ERROR Running ‘coef.R’ [5s/6s] Running ‘confint.R’ [27s/42s] Running ‘datetime.R’ [2s/3s] Running ‘egf.R’ [5s/6s] Running ‘egf_enum.R’ [2s/3s] Running ‘egf_eval.R’ [3s/3s] Running ‘egf_examples_day_of_week.R’ [3s/3s] Running ‘egf_examples_excess.R’ [2s/3s] Running ‘egf_examples_fixed.R’ [3s/3s] Running ‘egf_examples_random.R’ [43s/51s] Running ‘egf_link.R’ [2s/3s] Running ‘egf_misc.R’ [5s/6s] Running ‘egf_options.R’ [2s/3s] Running ‘egf_utils.R’ [5s/6s] Running ‘epidemic.R’ [2s/3s] Running ‘extract.R’ [5s/5s] Running ‘fitted.R’ [5s/5s] Running ‘gi.R’ [3s/3s] Running ‘include.R’ [164s/203s] Running ‘language.R’ [2s/3s] Running ‘prior.R’ [2s/3s] Running ‘profile.R’ [17s/31s] Running ‘summary.R’ [5s/6s] Running ‘utils.R’ [2s/3s] Running ‘validity.R’ [2s/3s] Running ‘zzz.R’ [2s/2s] Running the tests in ‘tests/include.R’ failed. Complete output: > library(epigrowthfit) > options(warn = 2L, error = if (interactive()) recover) > > src <- "src" > src. <- system.file("tests", src, package = "epigrowthfit", mustWork = TRUE) > file.copy(c(src, src.), tempdir(), recursive = TRUE) [1] TRUE TRUE > setwd(file.path(tempdir(), src)) > Sys.setenv(R_TESTS = "") # startup.Rs does not exist here > > dll <- "test" > cpp <- paste0(dll, ".cpp") > TMB::compile(cpp) Note: Using Makevars in /home/hornik/.R/Makevars-clang using C++ compiler: 'Debian clang version 18.1.8 (1)' make[1]: Entering directory '/tmp/RtmpFhSAxM/src' clang++-18 -std=gnu++17 -I"/home/hornik/tmp/R.check/r-devel-clang/Work/build/include" -DNDEBUG -I"/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/TMB/include" -I"/tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_test -DTMB_LIB_INIT=R_init_test -DCPPAD_FRAMEWORK -I/usr/local/include -D_FORTIFY_SOURCE=3 -fpic -g -O3 -Wall -pedantic -c test.cpp -o test.o In file included from test.cpp:1: In file included from /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/TMB/include/TMB.hpp:96: In file included from /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/Sparse:26: In file included from /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/SparseCore:61: /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/src/SparseCore/TriangularSolver.h:273:13: warning: variable 'count' set but not used [-Wunused-but-set-variable] 273 | Index count = 0; | ^ In file included from test.cpp:1: In file included from /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/TMB/include/TMB.hpp:96: In file included from /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/Sparse:29: In file included from /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/SparseLU:35: /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:78:9: warning: variable 'nsuper_et_post' set but not used [-Wunused-but-set-variable] 78 | Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree | ^ /tmp/RtmpQ87cxL/RLIBS_31be3a2d02cc43/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:79:9: warning: variable 'nsuper_et' set but not used [-Wunused-but-set-variable] 79 | Index nsuper_et = 0; // Number of relaxed snodes in the original etree | ^ 3 warnings generated. clang++-18 -std=gnu++17 -shared -L/home/hornik/tmp/R.check/r-devel-clang/Work/build/lib -Wl,-O1 -o test.so test.o -L/home/hornik/tmp/R.check/r-devel-clang/Work/build/lib -lR make[1]: Leaving directory '/tmp/RtmpFhSAxM/src' make[1]: Entering directory '/tmp/RtmpFhSAxM/src' make[1]: Leaving directory '/tmp/RtmpFhSAxM/src' [1] 0 > dyn.load(paste0(dll, .Platform[["dynlib.ext"]])) > > getReport <- local({ + tt <- readLines(cpp) + tt <- paste(tt, collapse = "\n") + tt <- chartr("\t\r\n", " ", tt) + tt <- sub("^.*?enum +test *\\{(.*?)\\} *;.*$", "\\1", tt) + tt <- gsub(" ", "", tt) + enum. <- strsplit(tt, ",")[[1L]] + + function(enum, ...) + TMB::MakeADFun(data = list(flag = match(enum, enum., 0L) - 1L, ...), + parameters = list(), + type = "Fun", + checkParameterOrder = FALSE, + DLL = dll)[["report"]]()[["ans"]] + }) > > mvlgamma <- function(x, p) + 0.25 * p * (p - 1) * log(pi) + rowSums(lgamma(outer(x, seq.int(0, by = 0.5, length.out = p), `-`))) > > dlkj <- function(x, eta, log = FALSE) { + n <- 0.5 * (1 + sqrt(1 + 8 * length(x))) + R <- diag(n) + R[upper.tri(R)] <- x + log.ans <- (eta - 1) * (-sum(log(colSums(R * R)))) + if (log) log.ans else exp(log.ans) + } > > dwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (df * log(det(S)) + (-df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(S, X)))) + if (log) log.ans else exp(log.ans) + } > > dinvwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (-df * log(det(S)) + (df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(X, S)))) + if (log) log.ans else exp(log.ans) + } > > > ## list_of_vectors_t > x <- list(rnorm(10L), seq_len(5L), TRUE, double(0L)) > ans <- getReport("list_of_vectors_t", x = x) Error in isNullPointer(ADFun$ptr) : R_ExternalPtrAddr: argument of type NILSXP is not an external pointer Calls: getReport -> <Anonymous> -> f -> isNullPointer Execution halted Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.15.3
Check: tests
Result: FAIL
Flavors: r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.15.3
Check: tests
Result: ERROR Running ‘coef.R’ [7s/13s] Running ‘confint.R’ [48s/83s] Running ‘datetime.R’ Running ‘egf.R’ [7s/12s] Running ‘egf_enum.R’ Running ‘egf_eval.R’ Running ‘egf_examples_day_of_week.R’ Running ‘egf_examples_excess.R’ Running ‘egf_examples_fixed.R’ Running ‘egf_examples_random.R’ [122s/112s] Running ‘egf_link.R’ Running ‘egf_misc.R’ [8s/13s] Running ‘egf_options.R’ Running ‘egf_utils.R’ [8s/10s] Running ‘epidemic.R’ Running ‘extract.R’ [7s/11s] Running ‘fitted.R’ [7s/12s] Running ‘gi.R’ Running ‘include.R’ [143s/202s] Running ‘language.R’ Running ‘prior.R’ Running ‘profile.R’ [28s/61s] Running ‘summary.R’ Running ‘utils.R’ Running ‘validity.R’ Running ‘zzz.R’ Running the tests in ‘tests/include.R’ failed. Complete output: > library(epigrowthfit) > options(warn = 2L, error = if (interactive()) recover) > > src <- "src" > src. <- system.file("tests", src, package = "epigrowthfit", mustWork = TRUE) > file.copy(c(src, src.), tempdir(), recursive = TRUE) [1] TRUE TRUE > setwd(file.path(tempdir(), src)) > Sys.setenv(R_TESTS = "") # startup.Rs does not exist here > > dll <- "test" > cpp <- paste0(dll, ".cpp") > TMB::compile(cpp) using C++ compiler: 'clang version 18.1.7' make[1]: Entering directory '/tmp/RtmpQbn4ST/working_dir/RtmpuXuxs9/src' /usr/local/clang18/bin/clang++ -std=gnu++17 -I"/data/gannet/ripley/R/R-clang/include" -DNDEBUG -I"/data/gannet/ripley/R/test-clang/TMB/include" -I"/tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_test -DTMB_LIB_INIT=R_init_test -DCPPAD_FRAMEWORK -isystem /usr/local/clang18/include -I/usr/local/clang/include -fpic -O3 -Wall -pedantic -frtti -Wp,-D_FORTIFY_SOURCE=3 -c test.cpp -o test.o In file included from test.cpp:1: In file included from /data/gannet/ripley/R/test-clang/TMB/include/TMB.hpp:96: In file included from /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/Sparse:26: In file included from /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/SparseCore:61: /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/src/SparseCore/TriangularSolver.h:273:13: warning: variable 'count' set but not used [-Wunused-but-set-variable] 273 | Index count = 0; | ^ In file included from test.cpp:1: In file included from /data/gannet/ripley/R/test-clang/TMB/include/TMB.hpp:96: In file included from /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/Sparse:29: In file included from /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/SparseLU:35: /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:78:9: warning: variable 'nsuper_et_post' set but not used [-Wunused-but-set-variable] 78 | Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree | ^ /tmp/RtmpQbn4ST/RLIBS_2cadb2a5d53e9/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:79:9: warning: variable 'nsuper_et' set but not used [-Wunused-but-set-variable] 79 | Index nsuper_et = 0; // Number of relaxed snodes in the original etree | ^ 3 warnings generated. /usr/local/clang18/bin/clang++ -std=gnu++17 -shared -L/usr/local/clang/lib64 -L/usr/local/clang18/lib -L/usr/local/clang18/lib/x86_64-unknown-linux-gnu -L/usr/local/gcc13/lib64 -L/usr/local/lib64 -o test.so test.o make[1]: Leaving directory '/tmp/RtmpQbn4ST/working_dir/RtmpuXuxs9/src' make[1]: Entering directory '/tmp/RtmpQbn4ST/working_dir/RtmpuXuxs9/src' make[1]: Leaving directory '/tmp/RtmpQbn4ST/working_dir/RtmpuXuxs9/src' [1] 0 > dyn.load(paste0(dll, .Platform[["dynlib.ext"]])) > > getReport <- local({ + tt <- readLines(cpp) + tt <- paste(tt, collapse = "\n") + tt <- chartr("\t\r\n", " ", tt) + tt <- sub("^.*?enum +test *\\{(.*?)\\} *;.*$", "\\1", tt) + tt <- gsub(" ", "", tt) + enum. <- strsplit(tt, ",")[[1L]] + + function(enum, ...) + TMB::MakeADFun(data = list(flag = match(enum, enum., 0L) - 1L, ...), + parameters = list(), + type = "Fun", + checkParameterOrder = FALSE, + DLL = dll)[["report"]]()[["ans"]] + }) > > mvlgamma <- function(x, p) + 0.25 * p * (p - 1) * log(pi) + rowSums(lgamma(outer(x, seq.int(0, by = 0.5, length.out = p), `-`))) > > dlkj <- function(x, eta, log = FALSE) { + n <- 0.5 * (1 + sqrt(1 + 8 * length(x))) + R <- diag(n) + R[upper.tri(R)] <- x + log.ans <- (eta - 1) * (-sum(log(colSums(R * R)))) + if (log) log.ans else exp(log.ans) + } > > dwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (df * log(det(S)) + (-df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(S, X)))) + if (log) log.ans else exp(log.ans) + } > > dinvwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (-df * log(det(S)) + (df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(X, S)))) + if (log) log.ans else exp(log.ans) + } > > > ## list_of_vectors_t > x <- list(rnorm(10L), seq_len(5L), TRUE, double(0L)) > ans <- getReport("list_of_vectors_t", x = x) Error in isNullPointer(ADFun$ptr) : R_ExternalPtrAddr: argument of type NILSXP is not an external pointer Calls: getReport -> <Anonymous> -> f -> isNullPointer Execution halted Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.15.3
Check: tests
Result: ERROR Running ‘coef.R’ Running ‘confint.R’ [54s/69s] Running ‘datetime.R’ Running ‘egf.R’ Running ‘egf_enum.R’ Running ‘egf_eval.R’ Running ‘egf_examples_day_of_week.R’ Running ‘egf_examples_excess.R’ Running ‘egf_examples_fixed.R’ Running ‘egf_examples_random.R’ [108s/60s] Running ‘egf_link.R’ Running ‘egf_misc.R’ Running ‘egf_options.R’ Running ‘egf_utils.R’ Running ‘epidemic.R’ Running ‘extract.R’ Running ‘fitted.R’ Running ‘gi.R’ Running ‘include.R’ [273s/276s] Running ‘language.R’ Running ‘prior.R’ Running ‘profile.R’ [32s/47s] Running ‘summary.R’ Running ‘utils.R’ Running ‘validity.R’ Running ‘zzz.R’ Running the tests in ‘tests/include.R’ failed. Complete output: > library(epigrowthfit) > options(warn = 2L, error = if (interactive()) recover) > > src <- "src" > src. <- system.file("tests", src, package = "epigrowthfit", mustWork = TRUE) > file.copy(c(src, src.), tempdir(), recursive = TRUE) [1] TRUE TRUE > setwd(file.path(tempdir(), src)) > Sys.setenv(R_TESTS = "") # startup.Rs does not exist here > > dll <- "test" > cpp <- paste0(dll, ".cpp") > TMB::compile(cpp) using C++ compiler: 'g++-14 (GCC) 14.1.0' make[1]: Entering directory '/tmp/RtmpV8elyH/working_dir/RtmpTfp1EV/src' g++-14 -std=gnu++17 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG -I"/data/gannet/ripley/R/test-dev/TMB/include" -I"/data/gannet/ripley/R/test-dev/RcppEigen/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_test -DTMB_LIB_INIT=R_init_test -DCPPAD_FRAMEWORK -I/usr/local/include -fpic -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Wp,-D_FORTIFY_SOURCE=3 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection -c test.cpp -o test.o In file included from /data/gannet/ripley/R/test-dev/TMB/include/TMB.hpp:201, from test.cpp:1: /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:221:22: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor] 221 | nestedTriangle<0>(){} | ^ /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:221:22: note: remove the '< >' /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:222:23: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor] 222 | nestedTriangle<0>(Base x) : Base(x){} | ^~~~ /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:222:23: note: remove the '< >' /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:223:23: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor] 223 | nestedTriangle<0>(vector<matrix<double> > args) : Block<double>(args[0]) {} | ^~~~~~~~~~~~~~~~~~~~~~~ /data/gannet/ripley/R/test-dev/TMB/include/expm.hpp:223:23: note: remove the '< >' g++-14 -std=gnu++17 -shared -L/usr/local/gcc14/lib64 -L/usr/local/lib64 -o test.so test.o make[1]: Leaving directory '/tmp/RtmpV8elyH/working_dir/RtmpTfp1EV/src' make[1]: Entering directory '/tmp/RtmpV8elyH/working_dir/RtmpTfp1EV/src' make[1]: Leaving directory '/tmp/RtmpV8elyH/working_dir/RtmpTfp1EV/src' [1] 0 > dyn.load(paste0(dll, .Platform[["dynlib.ext"]])) > > getReport <- local({ + tt <- readLines(cpp) + tt <- paste(tt, collapse = "\n") + tt <- chartr("\t\r\n", " ", tt) + tt <- sub("^.*?enum +test *\\{(.*?)\\} *;.*$", "\\1", tt) + tt <- gsub(" ", "", tt) + enum. <- strsplit(tt, ",")[[1L]] + + function(enum, ...) + TMB::MakeADFun(data = list(flag = match(enum, enum., 0L) - 1L, ...), + parameters = list(), + type = "Fun", + checkParameterOrder = FALSE, + DLL = dll)[["report"]]()[["ans"]] + }) > > mvlgamma <- function(x, p) + 0.25 * p * (p - 1) * log(pi) + rowSums(lgamma(outer(x, seq.int(0, by = 0.5, length.out = p), `-`))) > > dlkj <- function(x, eta, log = FALSE) { + n <- 0.5 * (1 + sqrt(1 + 8 * length(x))) + R <- diag(n) + R[upper.tri(R)] <- x + log.ans <- (eta - 1) * (-sum(log(colSums(R * R)))) + if (log) log.ans else exp(log.ans) + } > > dwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (df * log(det(S)) + (-df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(S, X)))) + if (log) log.ans else exp(log.ans) + } > > dinvwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (-df * log(det(S)) + (df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(X, S)))) + if (log) log.ans else exp(log.ans) + } > > > ## list_of_vectors_t > x <- list(rnorm(10L), seq_len(5L), TRUE, double(0L)) > ans <- getReport("list_of_vectors_t", x = x) Error in isNullPointer(ADFun$ptr) : R_ExternalPtrAddr: argument of type NILSXP is not an external pointer Calls: getReport -> <Anonymous> -> f -> isNullPointer Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.15.3
Check: installed package size
Result: NOTE installed size is 14.2Mb sub-directories of 1Mb or more: libs 13.6Mb Flavors: r-devel-windows-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

Version: 0.15.3
Check: tests
Result: ERROR Running 'coef.R' [5s] Running 'confint.R' [55s] Running 'datetime.R' [2s] Running 'egf.R' [5s] Running 'egf_enum.R' [2s] Running 'egf_eval.R' [2s] Running 'egf_examples_day_of_week.R' [2s] Running 'egf_examples_excess.R' [2s] Running 'egf_examples_fixed.R' [2s] Running 'egf_examples_random.R' [62s] Running 'egf_link.R' [2s] Running 'egf_misc.R' [6s] Running 'egf_options.R' [1s] Running 'egf_utils.R' [6s] Running 'epidemic.R' [2s] Running 'extract.R' [5s] Running 'fitted.R' [5s] Running 'gi.R' [2s] Running 'include.R' [89s] Running 'language.R' [2s] Running 'prior.R' [1s] Running 'profile.R' [38s] Running 'summary.R' [5s] Running 'utils.R' [2s] Running 'validity.R' [2s] Running 'zzz.R' [2s] Running the tests in 'tests/include.R' failed. Complete output: > library(epigrowthfit) > options(warn = 2L, error = if (interactive()) recover) > > src <- "src" > src. <- system.file("tests", src, package = "epigrowthfit", mustWork = TRUE) > file.copy(c(src, src.), tempdir(), recursive = TRUE) [1] TRUE TRUE > setwd(file.path(tempdir(), src)) > Sys.setenv(R_TESTS = "") # startup.Rs does not exist here > > dll <- "test" > cpp <- paste0(dll, ".cpp") > TMB::compile(cpp) using C++ compiler: 'g++.exe (GCC) 13.2.0' make[1]: Entering directory '/d/temp/RtmpEDy79r/src' g++ -std=gnu++17 -I"D:/RCompile/recent/R/include" -DNDEBUG -I"D:/RCompile/CRANpkg/lib/4.5/TMB/include" -I"D:/temp/Rtmpi2Bij4/RLIBS_6b5841a33361/RcppEigen/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_test -DTMB_LIB_INIT=R_init_test -DCPPAD_FRAMEWORK -I"d:/rtools44/x86_64-w64-mingw32.static.posix/include" -pedantic -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c test.cpp -o test.o g++ -std=gnu++17 -shared -s -static-libgcc -o test.dll tmp.def test.o -Ld:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools44/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R/bin/x64 -lR make[1]: Leaving directory '/d/temp/RtmpEDy79r/src' make[1]: Entering directory '/d/temp/RtmpEDy79r/src' make[1]: Leaving directory '/d/temp/RtmpEDy79r/src' [1] 0 > dyn.load(paste0(dll, .Platform[["dynlib.ext"]])) > > getReport <- local({ + tt <- readLines(cpp) + tt <- paste(tt, collapse = "\n") + tt <- chartr("\t\r\n", " ", tt) + tt <- sub("^.*?enum +test *\\{(.*?)\\} *;.*$", "\\1", tt) + tt <- gsub(" ", "", tt) + enum. <- strsplit(tt, ",")[[1L]] + + function(enum, ...) + TMB::MakeADFun(data = list(flag = match(enum, enum., 0L) - 1L, ...), + parameters = list(), + type = "Fun", + checkParameterOrder = FALSE, + DLL = dll)[["report"]]()[["ans"]] + }) > > mvlgamma <- function(x, p) + 0.25 * p * (p - 1) * log(pi) + rowSums(lgamma(outer(x, seq.int(0, by = 0.5, length.out = p), `-`))) > > dlkj <- function(x, eta, log = FALSE) { + n <- 0.5 * (1 + sqrt(1 + 8 * length(x))) + R <- diag(n) + R[upper.tri(R)] <- x + log.ans <- (eta - 1) * (-sum(log(colSums(R * R)))) + if (log) log.ans else exp(log.ans) + } > > dwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (df * log(det(S)) + (-df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(S, X)))) + if (log) log.ans else exp(log.ans) + } > > dinvwishart <- function(x, df, scale, log = FALSE) { + n <- 0.5 * (-1 + sqrt(1 + 8 * length(x))) + X <- theta2cov(x) + S <- theta2cov(scale) + log.ans <- -0.5 * (-df * log(det(S)) + (df + n + 1) * log(det(X)) + n * df * log(2) + 2 * mvlgamma(0.5 * df, n) + sum(diag(solve(X, S)))) + if (log) log.ans else exp(log.ans) + } > > > ## list_of_vectors_t > x <- list(rnorm(10L), seq_len(5L), TRUE, double(0L)) > ans <- getReport("list_of_vectors_t", x = x) Error in isNullPointer(ADFun$ptr) : R_ExternalPtrAddr: argument of type NILSXP is not an external pointer Calls: getReport -> <Anonymous> -> f -> isNullPointer Execution halted Flavor: r-devel-windows-x86_64

Package fastbeta

Current CRAN status: OK: 13