Skip to content

Commit

Permalink
Added RdPack to manage references (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc authored Feb 29, 2024
1 parent 07cd69b commit b0579b0
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 23 deletions.
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Depends:
R (>= 4.1.0)
Imports:
assertthat,
Rdpack,
checkmate,
dplyr,
stringr,
Expand Down Expand Up @@ -96,3 +97,4 @@ Collate:
'simulations_sf.R'
'zzz.R'
VignetteBuilder: knitr
RdMacros: Rdpack
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ import(checkmate)
import(ggplot2)
import(methods)
import(stringr)
importFrom(Rdpack,reprompt)
importFrom(ggplot2,autoplot)
importFrom(ggplot2.utils,geom_km)
importFrom(glue,as_glue)
Expand Down
4 changes: 3 additions & 1 deletion R/SurvivalQuantities.R
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,15 @@ setMethod(
#'
#' @description
#' Derives the Brier Scores (using Inverse Probability of Censoring Weighting)
#' for the Survival estimates as detailed in Blanche et. al. (2015).
#' for the Survival estimates as detailed in \insertCite{blanche2015}{jmpost}.
#'
#' @inheritParams SurvivalQuantities-Shared
#' @inheritParams Brier-Score-Shared
#'
#' @family brierScore
#' @family SurvivalQuantities
#' @references
#' \insertAllCited{}
#' @export
brierScore.SurvivalQuantities <- function(
object,
Expand Down
5 changes: 4 additions & 1 deletion R/brier_score.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,16 @@ reverse_km_cen_first <- function(t, times, events) {
#' @inheritParams Brier-Score-Shared
#'
#' @description
#' Implements the Brier Score as detailed in Blanche et. al. (2015)
#' Implements the Brier Score as detailed in \insertCite{blanche2015}{jmpost}
#'
#' @details
#' - `bs_get_squared_dist()` - implements the squared distance part
#' of the formula.
#' - `bs_get_weights()` - implements the IPCW weighting
#'
#' @references
#' \insertAllCited{}
#'
#' @keywords internal
brier_score <- function(
t,
Expand Down
1 change: 1 addition & 0 deletions R/jmpost-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
#' @importFrom glue as_glue
#' @importFrom tibble add_case
#' @importFrom stats acf
#' @importFrom Rdpack reprompt
NULL
2 changes: 1 addition & 1 deletion design/Intro_to_jmpost.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ header-includes:
- \usetikzlibrary{shapes.geometric, arrows}
output:
pdf_document: default
bibliography: bibliography.bib
bibliography: '`r system.file("REFERENCES.bib", package = "jmpost")`'
vignette: |
%\VignetteIndexEntry{Introduction to `jmpost`}
%\VignetteEncoding{UTF-8}
Expand Down
18 changes: 18 additions & 0 deletions design/bibliography.bib → inst/REFERENCES.bib
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@



@article{blanche2015,
author = {Blanche, Paul and Proust-Lima, Cécile and Loubère, Lucie and Berr, Claudine and Dartigues, Jean-François and Jacqmin-Gadda, Hélène},
title = {Quantifying and comparing dynamic predictive accuracy of joint models for longitudinal marker and time-to-event in presence of censoring and competing risks},
journal = {Biometrics},
volume = {71},
number = {1},
pages = {102-113},
keywords = {Competing risks, Dynamic prediction, Joint model, Longitudinal data, Prediction accuracy},
doi = {https://doi.org/10.1111/biom.12232},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/biom.12232},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/biom.12232},
year = {2015}
}


@article{kerioui2020bayesian,
title={Bayesian inference using Hamiltonian Monte-Carlo algorithm for nonlinear joint modelling in the context of cancer immunotherapy},
author={Kerioui, Marion and Mercier, Francois and Bertrand, Julie and Tardivon, Coralie and Bruno, Ren{\'e} and Guedj, J{\'e}r{\'e}mie and Desm{\'e}e, Sol{\`e}ne},
Expand Down
17 changes: 0 additions & 17 deletions inst/references.bib

This file was deleted.

5 changes: 4 additions & 1 deletion man/brierScore.SurvivalQuantities.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/brier_score.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/statistical-specification.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Statistical Specifications"
package: jmpost
bibliography: '`r system.file("references.bib", package = "jmpost")`'
bibliography: '`r system.file("REFERENCES.bib", package = "jmpost")`'
csl: '`r system.file("jss.csl", package = "jmpost")`'
output:
rmarkdown::html_vignette:
Expand Down

0 comments on commit b0579b0

Please sign in to comment.