{"id":21492082,"url":"https://github.com/johannesbuchner/rmultinest","last_synced_at":"2026-05-17T21:02:24.042Z","repository":{"id":4352263,"uuid":"5488374","full_name":"JohannesBuchner/RMultiNest","owner":"JohannesBuchner","description":"R wrapper for MultiNest","archived":false,"fork":false,"pushed_at":"2015-05-04T21:08:23.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-23T20:51:34.935Z","etag":null,"topics":["bayesian-inference","integration-methods","monte-carlo","nested-sampling","r"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohannesBuchner.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-21T00:08:32.000Z","updated_at":"2020-07-27T23:46:29.000Z","dependencies_parsed_at":"2022-07-10T21:02:48.412Z","dependency_job_id":null,"html_url":"https://github.com/JohannesBuchner/RMultiNest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohannesBuchner%2FRMultiNest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohannesBuchner%2FRMultiNest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohannesBuchner%2FRMultiNest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohannesBuchner%2FRMultiNest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohannesBuchner","download_url":"https://codeload.github.com/JohannesBuchner/RMultiNest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022634,"owners_count":20385133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian-inference","integration-methods","monte-carlo","nested-sampling","r"],"created_at":"2024-11-23T15:22:09.354Z","updated_at":"2026-05-17T21:02:19.022Z","avatar_url":"https://github.com/JohannesBuchner.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========================\nR Bridge for MultiNest\n==========================\n\nAuthor: Johannes Buchner (C) 2012-2013\n\nAbout\n---------------------\nThis code allows likelihood functions written in R (http://www.r-project.org) to be used by MultiNest.\n\n\nHow does it work\n---------------------\nThe main program will connect to R using Rserve. It will run MultiNest, and\nfor each point evaluation call the user-defined R callback function.\n\n\nInstallation\n---------------------------\n\n#. You need MultiNest. \n\n\t* Download it (e.g. from https://github.com/JohannesBuchner/MultiNest)\n\t* Make sure libmultinest.so is in your library path if it is not already::\n\n\t\t$ export LD_LIBRARY_PATH=/my/path/to/MultiNest/\n\n\t.. warning:: \n\n\t\tIf you do not do this, you will see this error::\n\t\t\n\t\t\t./rbridge: error while loading shared libraries: libmultinest.so: cannot open shared object file: No such file or directory\n\n#. Download this package (latest at https://github.com/JohannesBuchner/RMultiNest), and extract it into the MultiNest directory.\n\n\t.. hint:: \n\t\n\t\tQuick installation::\n\t\t\n\t\t\t$ R --no-save\n\t\t\t\u003e install.packages(\"Rserve\")\n\t\t\t\u003e quit()\n\t\t\t$ make rbridge test\n\t\n\t\tIf that doesn't go through smoothly, follow the manual steps 2-6. \n\nPlease report issues at https://github.com/JohannesBuchner/RMultiNest/issues\n\n\nBuilding Rserve C++ client\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOtherwise, follow these manual steps.\n\n2. Download Rserve (the tar file, Rserve_xxxx.tar.gz) from http://www.rforge.net/Rserve/ and extract it into this directory. You should now have::\n\n     $ ls\n     Makefile\n     README.rst\n     multinest.h\n     rbridge.cc\n     Rserve/\n\n3. Configure Rserve::\n\n     $ ./Rserve/configure \n   \n4. Configure and build the Rserve C++ client (in Rserve/clients/cxx/)::\n\n     $ cd Rserve/clients/cxx/\n     $ ./configure \u0026\u0026 make Rconnection.o\n     $ cd ../../../\n\nBuilding Rbridge\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n5. Run make to compile Rbridge::\n\n     $ make\n\nInstalling Rserve in R\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n6. In R, install RServe using the instructions on the website. In short::\n\n     $ R\n     \u003e install.packages(\"Rserve\")\n\nRunning\n---------------------\n\nThe \"runtest.sh\" script runs the steps below for testing whether the installation worked.\nBut you probably want to understand how to run your own code, so follow these steps.\n\n1. Write log likelihood function in a R file (has to be called \"log_likelihood\"),\n   and a prior transformation (has to be called \"prior\")\n    \n   test.r::\n\n       prior \u003c- function(cube) cube\n       \n       log_likelihood \u003c- function(params) { \n       print (params);\n       0\n       }\n\n   This is an example flat log_likelihood, and a flat prior.\n\n2. Write a config file that tells which file to load\n\n   conf.rs::\n   \n       source test.r\n \n3. Run Rserve\n   ::\n \n    $ R\n    \u003e library(Rserve) # you installed this package before using install.packages\n    \u003e Rserve(args=c(\"--RS-conf\", \"conf.rs\", \"--no-save\"))\n \n4. run ./rbridge in shell\n   ::\n\n   $ ./rbridge\n\n   This will connect to R using Rserve, and call R through that for each point evaluation.\n\n5. Finally, terminate Rserve\n   ::\n \n   $ killall Rserve-bin.so\n\nWhat now?\n~~~~~~~~~~\nWell, you should now have the MultiNest output files lying there. You can learn to understand\nthem by reading the MultiNest README (https://github.com/JohannesBuchner/MultiNest/blob/master/README). \n\nYou can either use pymultinest to plot and analyse them, or write your own routines in R.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohannesbuchner%2Frmultinest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohannesbuchner%2Frmultinest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohannesbuchner%2Frmultinest/lists"}