{
  "_id": "6a103fadacfb0bcc41c9ce97",
  "Package": "rust",
  "Type": "Package",
  "Title": "Ratio-of-Uniforms Simulation with Transformation",
  "Version": "1.4.4",
  "Date": "2026-01-11",
  "Authors@R": "person(c(\"Paul\", \"J.\"), \"Northrop\", email = \"p.northrop@ucl.ac.uk\",\nrole = c(\"aut\", \"cre\", \"cph\"))",
  "Description": "Uses the generalized ratio-of-uniforms (RU) method to\nsimulate from univariate and (low-dimensional) multivariate\ncontinuous distributions. The user specifies the log-density,\nup to an additive constant. The RU algorithm is applied after\nrelocation of mode of the density to zero, and the user can\nchoose a tuning parameter r. For details see Wakefield, Gelfand\nand Smith (1991) <DOI:10.1007/BF01889987>, Efficient generation\nof random variates via the ratio-of-uniforms method, Statistics\nand Computing (1991) 1, 129-133.  A Box-Cox variable\ntransformation can be used to make the input density suitable\nfor the RU method and to improve efficiency.  In the\nmultivariate case rotation of axes can also be used to improve\nefficiency. From version 1.2.0 the 'Rcpp' package\n<https://cran.r-project.org/package=Rcpp> can be used to\nimprove efficiency.",
  "License": "GPL (>= 2)",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "URL": "https://paulnorthrop.github.io/rust/,\nhttps://github.com/paulnorthrop/rust",
  "BugReports": "https://github.com/paulnorthrop/rust/issues",
  "Config/testthat/edition": "3",
  "Repository": "https://paulnorthrop.r-universe.dev",
  "Date/Publication": "2026-01-11 14:48:01 UTC",
  "RemoteUrl": "https://github.com/paulnorthrop/rust",
  "RemoteRef": "HEAD",
  "RemoteSha": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-05-11 08:40:04 UTC",
    "User": "root"
  },
  "Author": "Paul J. Northrop [aut, cre, cph]",
  "Maintainer": "Paul J. Northrop <p.northrop@ucl.ac.uk>",
  "MD5sum": "0a48daaf216b397d5380efb145082f02",
  "_user": "paulnorthrop",
  "_type": "src",
  "_file": "rust_1.4.4.tar.gz",
  "_fileid": "5fc574cf439994e1ae6481a92519abaa5211624272ada1c7931c97773fe027fa",
  "_filesize": 3777300,
  "_sha256": "5fc574cf439994e1ae6481a92519abaa5211624272ada1c7931c97773fe027fa",
  "_created": "2026-05-11T08:40:04.000Z",
  "_published": "2026-05-22T11:36:13.179Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77371614392,
      "time": 153,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6913994820"
    },
    {
      "job": 77371614394,
      "time": 160,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6913998961"
    },
    {
      "job": 77371614735,
      "time": 153,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6913994837"
    },
    {
      "job": 77371614844,
      "time": 178,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6914004783"
    },
    {
      "job": 77371614712,
      "time": 108,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6913981030"
    },
    {
      "job": 77371614836,
      "time": 358,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6914061302"
    },
    {
      "job": 77371614725,
      "time": 96,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6913977309"
    },
    {
      "job": 77371614710,
      "time": 176,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6914002260"
    },
    {
      "job": 77371614033,
      "time": 319,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6913946181"
    },
    {
      "job": 77371614110,
      "time": 122,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7159533589"
    },
    {
      "job": 77371614726,
      "time": 124,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6913986054"
    },
    {
      "job": 77371614880,
      "time": 126,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6913986487"
    },
    {
      "job": 77371614767,
      "time": 181,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6914004203"
    }
  ],
  "_buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/paulnorthrop/rust",
  "_commit": {
    "id": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
    "author": "Paul Northrop <p.northrop@ucl.ac.uk>",
    "committer": "Paul Northrop <p.northrop@ucl.ac.uk>",
    "message": "pkgdown [ci skip]\n",
    "time": 1768142881
  },
  "_maintainer": {
    "name": "Paul J. Northrop",
    "email": "p.northrop@ucl.ac.uk",
    "login": "paulnorthrop",
    "uuid": 22778905
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.3.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "version": ">= 0.12.10",
      "role": "LinkingTo"
    },
    {
      "package": "RcppArmadillo",
      "role": "LinkingTo"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "version": ">= 0.12.10",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "bang",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "microbenchmark",
      "role": "Suggests"
    },
    {
      "package": "revdbayes",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    }
  ],
  "_owner": "paulnorthrop",
  "_selfowned": true,
  "_usedby": 8,
  "_updates": [
    {
      "week": "2025-52",
      "n": 5
    },
    {
      "week": "2026-01",
      "n": 3
    },
    {
      "week": "2026-02",
      "n": 6
    }
  ],
  "_tags": [
    {
      "name": "v.1.4.4",
      "date": "2026-01-11"
    }
  ],
  "_topics": [
    "1977",
    "bayesian-inference",
    "kinderman",
    "monahan",
    "of",
    "posterior-samples",
    "ratio",
    "ratio-of-uniforms",
    "ratio-of-uniforms-method",
    "rcpp",
    "simulation",
    "transformation",
    "uniforms",
    "openblas",
    "cpp"
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "paulnorthrop",
      "count": 579,
      "uuid": 22778905
    }
  ],
  "_userbio": {
    "uuid": 22778905,
    "type": "user",
    "name": "Paul Northrop"
  },
  "_downloads": {
    "count": 3166,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/rust"
  },
  "_mentions": 3,
  "_devurl": "https://github.com/paulnorthrop/rust",
  "_pkgdown": "https://paulnorthrop.github.io/rust/",
  "_searchresults": 40,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/rust.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/paulnorthrop/rust",
  "_realowner": "paulnorthrop",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2016-10-10"
    },
    {
      "version": "1.1.0",
      "date": "2016-11-18"
    },
    {
      "version": "1.2.0",
      "date": "2017-05-27"
    },
    {
      "version": "1.2.1",
      "date": "2017-06-01"
    },
    {
      "version": "1.2.2",
      "date": "2017-06-01"
    },
    {
      "version": "1.2.3",
      "date": "2017-08-28"
    },
    {
      "version": "1.3.3",
      "date": "2017-12-17"
    },
    {
      "version": "1.3.4",
      "date": "2017-12-22"
    },
    {
      "version": "1.3.5",
      "date": "2018-05-16"
    },
    {
      "version": "1.3.6",
      "date": "2019-02-10"
    },
    {
      "version": "1.3.7",
      "date": "2019-11-27"
    },
    {
      "version": "1.3.8",
      "date": "2019-12-20"
    },
    {
      "version": "1.3.9",
      "date": "2020-07-21"
    },
    {
      "version": "1.3.10",
      "date": "2020-09-02"
    },
    {
      "version": "1.3.11",
      "date": "2021-02-08"
    },
    {
      "version": "1.3.12",
      "date": "2021-06-03"
    },
    {
      "version": "1.3.13",
      "date": "2021-10-31"
    },
    {
      "version": "1.4.0",
      "date": "2022-11-16"
    },
    {
      "version": "1.4.1",
      "date": "2023-09-02"
    },
    {
      "version": "1.4.2",
      "date": "2023-12-02"
    },
    {
      "version": "1.4.3",
      "date": "2024-08-17"
    },
    {
      "version": "1.4.4",
      "date": "2026-01-11"
    }
  ],
  "_exports": [
    "create_log_j_xptr",
    "create_phi_to_theta_xptr",
    "create_xptr",
    "find_lambda",
    "find_lambda_one_d",
    "find_lambda_one_d_rcpp",
    "find_lambda_rcpp",
    "gpd_init",
    "gpd_logpost",
    "gpd_sum_stats",
    "rgpd",
    "ru",
    "ru_rcpp"
  ],
  "_help": [
    {
      "page": "rust-package",
      "title": "rust: Ratio-of-Uniforms Simulation with Transformation",
      "topics": [
        "rust-package",
        "rust"
      ]
    },
    {
      "page": "create_log_j_xptr",
      "title": "Create external pointer to a C++ function for 'log_j'",
      "topics": [
        "create_log_j_xptr"
      ]
    },
    {
      "page": "create_phi_to_theta_xptr",
      "title": "Create external pointer to a C++ function for 'phi_to_theta'",
      "topics": [
        "create_phi_to_theta_xptr"
      ]
    },
    {
      "page": "create_xptr",
      "title": "Create external pointer to a C++ function for 'logf'",
      "topics": [
        "create_xptr"
      ]
    },
    {
      "page": "find_lambda",
      "title": "Selecting the Box-Cox parameter for general d",
      "topics": [
        "find_lambda"
      ]
    },
    {
      "page": "find_lambda_one_d",
      "title": "Selecting the Box-Cox parameter in the 1D case",
      "topics": [
        "find_lambda_one_d"
      ]
    },
    {
      "page": "find_lambda_one_d_rcpp",
      "title": "Selecting the Box-Cox parameter in the 1D case using Rcpp",
      "topics": [
        "find_lambda_one_d_rcpp"
      ]
    },
    {
      "page": "find_lambda_rcpp",
      "title": "Selecting the Box-Cox parameter for general d using Rcpp",
      "topics": [
        "find_lambda_rcpp"
      ]
    },
    {
      "page": "gpd_init",
      "title": "Initial estimates for Generalized Pareto parameters",
      "topics": [
        "gpd_init"
      ]
    },
    {
      "page": "gpd_logpost",
      "title": "Generalized Pareto posterior log-density",
      "topics": [
        "gpd_logpost"
      ]
    },
    {
      "page": "gpd_sum_stats",
      "title": "Generalized Pareto summary statistics",
      "topics": [
        "gpd_sum_stats"
      ]
    },
    {
      "page": "plot.ru",
      "title": "Plot diagnostics for an ru object",
      "topics": [
        "plot.ru"
      ]
    },
    {
      "page": "print.ru",
      "title": "Print method for an '\"ru\"' object",
      "topics": [
        "print.ru"
      ]
    },
    {
      "page": "rgpd",
      "title": "Generalized Pareto simulation",
      "topics": [
        "rgpd"
      ]
    },
    {
      "page": "ru",
      "title": "Generalized ratio-of-uniforms sampling",
      "topics": [
        "ru"
      ]
    },
    {
      "page": "ru_rcpp",
      "title": "Generalized ratio-of-uniforms sampling using C++ via Rcpp",
      "topics": [
        "ru_rcpp"
      ]
    },
    {
      "page": "summary.ru",
      "title": "Summarizing ratio-of-uniforms samples",
      "topics": [
        "print.summary.ru",
        "summary.ru"
      ]
    }
  ],
  "_readme": "https://github.com/paulnorthrop/rust/raw/HEAD/README.md",
  "_rundeps": [
    "Rcpp",
    "RcppArmadillo"
  ],
  "_sysdeps": [
    {
      "shlib": "liblapack",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libblas",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "rust-a-vignette.Rmd",
      "filename": "rust-a-vignette.html",
      "title": "Introducing rust: Ratio-of-Uniforms Simulation with Transformation",
      "author": "Paul Northrop",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The multivariate generalized ratio-of-uniforms method",
        "Example: the multivariate normal distribution",
        "Transformation of variable prior to sampling",
        "Relocation of the mode to the origin",
        "Transformations to improve normality and reduce association",
        "Using the code",
        "Example 1: posterior density from a generalized Pareto extreme value analysis",
        "Example 2: log-normal density",
        "Example 3: gamma density",
        "Example 4: normal density",
        "References"
      ],
      "created": "2018-12-16 21:19:38",
      "modified": "2024-02-24 12:46:45",
      "commits": 11
    },
    {
      "source": "rust-c-using-rcpp-vignette.Rmd",
      "filename": "rust-c-using-rcpp-vignette.html",
      "title": "Rusting Faster: Simulation using Rcpp",
      "author": "Paul Northrop",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Providing a C++ function to ru_rcpp",
        "Examples : ru_rcpp",
        "Standard normal density",
        "Multivariate normal density",
        "Log-normal density after Box-Cox transformation",
        "Generalized Pareto posterior density",
        "Examples : find_lambda_one_d_rcpp and find_lambda_rcpp",
        "Gamma density: example for find_lambda_one_d_rcpp",
        "Generalized Pareto posterior density: example for find_lambda_rcpp",
        "References"
      ],
      "created": "2018-12-16 21:19:38",
      "modified": "2024-02-24 12:30:59",
      "commits": 5
    },
    {
      "source": "rust-b-when-to-use-vignette.Rmd",
      "filename": "rust-b-when-to-use-vignette.html",
      "title": "When can rust be used?",
      "author": "Paul Northrop",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Conditions on $f$",
        "Unbounded densities",
        "Heavy-tailed densities",
        "Cauchy density",
        "Hierarchical 1-way ANOVA with few groups",
        "Multimodal densities",
        "References"
      ],
      "created": "2018-12-16 21:19:38",
      "modified": "2024-02-24 12:09:46",
      "commits": 6
    }
  ],
  "_score": 7.613115912060912,
  "_indexed": true,
  "_nocasepkg": "rust",
  "_universes": [
    "paulnorthrop"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:42.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "10e0189871c3eb4e605f5a1e0bf12b117acb66eaae4242b022bb0e2e63c434c3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:54.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "59e69afc433e5103ca2fa54bef74368ca1a75af3a185387dea2d13d444eb34dd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:42.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "51d7e61c5a2df0a683b5b9215cd959ac10e989c399037a6a69ed800d112c0cdc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.4.4",
      "date": "2026-05-11T08:43:09.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "01b3bd3cafee0e36d57b67ba8853a03b186439e81e662d2cef877409d48064df",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:09.000Z",
      "arch": "aarch64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "7827bafa1e60389a14490df55fcf09141570e58003fefd0d1a03158827bbca35",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.4.4",
      "date": "2026-05-11T08:44:26.000Z",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "8f407107672d6bc075cc51d5b5a6b9c4568c4601d5b08b8d4c611161b7b42d8f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.4.4",
      "date": "2026-05-11T08:41:56.000Z",
      "arch": "aarch64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "e0d949d62dd799535d54f1ab9472efb2790015cb73c64319b6d5183733458efd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:47.000Z",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "360940cb19fa7cbca2c12028b058af695217e4707a9ddc49bdb0a722a0096663",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.4.4",
      "date": "2026-05-11T08:41:44.000Z",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "1c2fd106ddbd2a135467eea5f6f7861432f29f21f6605a5f8112857068cb64dc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.4.4",
      "date": "2026-05-11T08:41:47.000Z",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "b13ca585617d8b62df3fbc2de3019217cf29f8786fef09b1203d978929730cc8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.4.4",
      "date": "2026-05-11T08:42:11.000Z",
      "arch": "x86_64",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "8daba02b538c95c24d2016483550e6219b0255fcd9a2ecdd98a7e65bcc54e4eb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.4.4",
      "date": "2026-05-22T11:35:40.000Z",
      "arch": "emscripten",
      "commit": "c9fda897847f1a1149c4461ba2433e4eb9b0f8c6",
      "fileid": "f0592fa67c617bac8b6871fdc763af51f45b54587c747a7cfab3b296c40f817b",
      "status": "success",
      "buildurl": "https://github.com/r-universe/paulnorthrop/actions/runs/25659366356"
    }
  ]
}