FPEMglobal is an R package for producing estimates and projections of contraceptive use and unmet need for family planning among married, unmarried, and all women.
This package was developed by the Family Planning Research (FPR) Group which is comprised of teams from the Alkema Lab at the University of Massachusetts, Amherst, the Population Division of the United Nations Dept. of Economic and Social Affairs, and Track20 at Avenir Health. It was supported, in part, by grants nos. OPP1110679 and OPP1183453, Making Family Planning Count, from the Bill & Melinda Gates Foundation. The package vignette has more information (vignette("FPEMglobal_Intro")
).
The views expressed herein are those of the authors and do not necessarily reflect the views of the United Nations.
Ensure you have installed both R and JAGS. FPEMglobal has been tested with R v4.0.0--v.4.3.1 (64 bit) and JAGS v4.3.0--v4.3.1.
Follow one of the following three options:
In R, type:
remotes::install_github(repo = "https://github.com/FPcounts/FPEMglobal",
ref = remotes::github_release(),
build_manual = TRUE, build_vignettes = TRUE, dependencies = TRUE)
repo
is the only mandatory argument. If you encounter any problems you can try omitting any, or all, of the others. If you do not supply the ref
argument, or if you change it, you may end up installing an old release or one that is in development and not fully tested.
Install the package: launch R and type:
install.packages("[path/to/FPEMglobal_<x.y.z>.zip]", repos = NULL)
You will need to edit the first argument to ensure you enter the correct file path to the zip file. <x.y.z>
should be replaced by the actual version number. You will also need to install any package depencencies according to the notices that come up.
You will need to have basic knowledge of Git, GitHub, and the command line interface on your system to use this option.
Issue the following commands:
R CMD build FPEMglobal
R CMD INSTALL FPEMglobal_<x.y.z>.tar.gz
In the last command, <x.y.z>
should be replaced by the actual version number.
If you get errors related to the vignette, try modifying the first command as follows: R CMD build --no-build-vignettes FPEMglobal
. If you are on Windows and you get an error after a line of output containing "i386" , try modifying the second command as follows: R CMD INSTALL --no-multiarch FPEMglobal_<x.y.z>.tar.gz
(replacing <x.y.z>
accordingly). If you still have problems, follow the instructions above to install from the zip file.
The vignette "Introduction to FPEMglobal" explains the package and how to use it. From within R type:
vignette("FPEMglobal_Intro")
The vignette will not be available if you excluded it by omitting the build_vignettes
argument in installation option (1) or adding --no-build-vignettes
in option (3).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.