[R] Issue with Rmath standalone (dwilcox, pwilcox, qwilcox, rwilcox) with unif_rand()

2023-02-14 Thread Mark Clements via R-help
I may have found a bug in the Rmath standalone library when providing a user-defined random number generator (for context, I was investigating using Mersenne Twister with Rmath). The following C code does not compile using the Makefile: // test_fails.c #define MATHLIB_STANDALONE #include

[R] C++11 requirements for package dependencies

2020-11-30 Thread Mark Clements
A colleague uses a package I maintain (rstpm2) as a dependency in their package (rsimsum) with testing using GitHub Actions. They found that testing failed against R versions 3.3, 3.4 and 3.5 because recent versions of RcppArmadillo (which is a dependency in rstpm2) require C++11. As a dependency

[R] [R-pkgs] ascii package returns to CRAN

2020-09-21 Thread Mark Clements
The ascii package provides formatted tables and lists in a number of markup formats (Asciidoc, Org mode, Pandoc markdown, ReStructured text, Txt2tags and Textile). Documents in Rmarkdown and Org mode can include R code blocks that produce markup output. Sweave drivers are also available for all

[R] Vectorised uniroot function

2019-04-23 Thread Mark Clements
A vectorised uniroot function would be useful for function inversion, e.g. for quantile functions and random number generation. To address this, I have implemented rstpm2::vuniroot that adapts the C function R_zeroin2 for Brent's method for a vectorised objective. The function currently uses Rcpp,

[R] Delta method using numerical derivatives

2011-02-15 Thread Mark Clements
Dear all, Is there a fairly general R implementation of the delta method that uses numerical derivatives? I realise that the delta method has been implemented using symbolic derivatives (e.g. alr3::delta.method, emdbook::deltamethod, msm::deltamethod and survey:::nlcon), however possibly