DRAFT WORKING VERSION - Some code and documentation is still incomplete or in need of being refined. The code and documentation are still undergoing internal review by the analyst team.
tobalcepi
is currently available only to members of the project team (but please contact Duncan Gillespie duncan.gillespie@sheffield.ac.uk to discuss). To access you need to sign-up for a GitLab account. You will then need to be added to the STAPM project team to gain access.
Once that is sorted, you can install the development version from GitLab with:
-#install.packages("devtools") ++# this should make a box pop up where you enter your GitLab password+#install.packages("devtools") #install.packages("getPass") -devtools::install_git( - "https://gitlab.com/stapm/r-packages/tobalcepi.git", - credentials = git2r::cred_user_pass("uname", getPass::getPass()), - ref = "x.x.x", - build_vignettes = TRUE -) +devtools::install_git( + "https://gitlab.com/stapm/r-packages/tobalcepi.git", + credentials = git2r::cred_user_pass("uname", getPass::getPass()), + ref = "x.x.x", + build_vignettes = TRUE +) # Where uname is your Gitlab user name. # ref = "x.x.x" is the version to install - remove this to install the latest version -# this should make a box pop up where you enter your GitLab password
Then load the package, and some other packages that are useful. Note that the code within tobalcepi
uses the data.table::data.table()
syntax.
# Load the package -library(tobalcepi) ++library(dplyr) # for data manipulation and summary +library(magrittr) # for pipes +library(ggplot2) # for plotting+# Load the package +library(tobalcepi) # Other useful packages -library(dplyr) # for data manipulation and summary -library(magrittr) # for pipes -library(ggplot2) # for plotting
Angus, Colin, M Henney, L Webster, and Duncan Gillespie. 2018. “Alcohol-Attributable Diseases and Dose-Response Curves for the Sheffield Alcohol Policy Model Version 4.0.” https://doi.org/10.15131/shef.data.6819689.v1.
+Angus, Colin, M Henney, L Webster, and Duncan Gillespie. 2018. “Alcohol-Attributable Diseases and Dose-Response Curves for the Sheffield Alcohol Policy Model Version 4.0.” The University of Sheffield. https://doi.org/10.15131/shef.data.6819689.v2.
Webster, Laura, Colin Angus, Alan Brennan, and Duncan Gillespie. 2018. “Smoking and the Risks of Adult Diseases.” The University of Sheffield. https://doi.org/10.15131/shef.data.7411451.v1.
@@ -265,6 +267,7 @@AlcBinge(data, params = tobalcepi::binge_params)+
AlcBinge(data, params = tobalcepi::binge_params)