Skip to content

Commit

Permalink
fix bug linked to dev status labels
Browse files Browse the repository at this point in the history
  • Loading branch information
dosgillespie committed Nov 28, 2020
1 parent 46102ca commit db9e878
Show file tree
Hide file tree
Showing 67 changed files with 400 additions and 147 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tobalcepi
Type: Package
Title: Risk Functions and Attributable Fractions for Tobacco and Alcohol
Version: 1.3.0
Version: 1.3.1
Authors@R:
c(
person(given = "Duncan",
Expand Down
15 changes: 12 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# Generated by roxygen2: do not edit by hand

export("\\lifecycle{experimental}")
export("\\lifecycle{maturing}")
export("\\lifecycle{stable}")
export(AlcBinge)
export(AlcBinge_stapm)
export(AlcLags)
export(ExpandCodes)
export(PArisk)
export(RRFunc)
export(RRTobDR)
export(RRalc)
export(RRtob)
export(TobAlcInt)
export(TobLags)
export(WArisk_acute)
export(subgroupRisk)
import(data.table)
importFrom(Rdpack,reprompt)
importFrom(data.table,":=")
importFrom(data.table,copy)
importFrom(data.table,rbindlist)
importFrom(data.table,setDT)
importFrom(data.table,setnames)
importFrom(lifecycle,deprecate_soft)
3 changes: 2 additions & 1 deletion R/AlcBinge.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Calculate variables to inform alcohol binge model
#'
#' \lifecycle{superseded}
#'
#' Designed to work with cross-sectional survey data with a wide range of individual-level covariates.
#' Uses survey data and previously estimated coefficients to describe
Expand All @@ -19,7 +21,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/AlcBinge_stapm.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Calculate variables to inform alcohol binge model - STAPM version
#'
#' \lifecycle{maturing}
#'
#' Designed to work with simulated individual trajectories of alcohol consumption - stratified by
#' age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to
Expand Down Expand Up @@ -28,7 +30,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{maturing}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/AlcLags.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#' Alcohol lag times
#'
#' \lifecycle{stable}
#'
#' Prepare the disease specific functions that describe how a change in alcohol consumption
#' gradually has an effect on the relative risk of disease incidence over time (up to 20 years)
#' since alcohol consumption changed.
Expand All @@ -18,7 +20,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#' \dontrun{
Expand Down
3 changes: 2 additions & 1 deletion R/ExpandCodes.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


#' Convert groups of ICD-10 codes to single codes
#'
#' \lifecycle{stable}
#'
#' Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
#'
Expand All @@ -14,7 +16,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/PArisk.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


#' Relative risks for alcohol-related injuries
#'
#' \lifecycle{stable}
#'
#' Uses the 'new' binge model methods to calculate a relative risk
#' for each individual for experiencing each cause during one year.
Expand Down Expand Up @@ -37,7 +39,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/RRAlc.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


#' Relative risks for alcohol related diseases
#'
#' \lifecycle{stable}
#'
#' Computes the relative risks for each alcohol related disease based on the published risk curves.
#'
Expand Down Expand Up @@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/RRFunc.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Individual relative risks of disease
#'
#' \lifecycle{maturing}
#'
#' @description
#' This function takes a sample of individuals and computes each individual's relative risk
Expand Down Expand Up @@ -111,7 +113,6 @@
#' @seealso \code{\link{RRalc}} for alcohol-specific risks, \code{\link{RRtob}} for tobacco-specific risks,
#' \code{\link{AlcLags}} for alcohol-specific lag times, and \code{\link{TobLags}} for tobacco-specific lag times.
#'
#' \lifecycle{maturing}
#'
#' @examples
#' \dontrun{
Expand Down
3 changes: 2 additions & 1 deletion R/RRTobDR.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#' Dose-response relative risks for tobacco-related cancers
#'
#' \lifecycle{experimental}
#'
#' Computes the relative risks for each tobacco-related cancer based on the published risk curves.
#'
Expand All @@ -17,7 +19,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{experimental}
#'
#'
#' @examples
Expand Down
3 changes: 2 additions & 1 deletion R/RRtob.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Tobacco relative risks
#'
#' \lifecycle{maturing}
#'
#' Relative risks for current vs. never cigarette smokers.
#'
Expand Down Expand Up @@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{maturing}
#'
#' @examples
#'\dontrun{
Expand Down
3 changes: 2 additions & 1 deletion R/TobAlcInt.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


#' Risk interaction between tobacco and alcohol
#'
#' \lifecycle{maturing}
#'
#' Assigns the disease-specific interaction term (synergy index) appropriate to each
#' individual's tobacco and alcohol consumption.
Expand Down Expand Up @@ -33,7 +35,6 @@
#'
#' \insertRef{Prabhu2014}{tobalcepi}
#'
#' \lifecycle{maturing}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/TobLags.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Tobacco lag times
#'
#' \lifecycle{stable}
#'
#' Prepare the disease specific functions that describe how a change in tobacco consumption
#' gradually has an effect on the relative risk of disease incidence over time (up to 40 years)
Expand Down Expand Up @@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/WArisk_acute.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Risk of acute conditions wholly-attributable to alcohol
#'
#' \lifecycle{stable}
#'
#' Uses the 'new' binge model methods to calculate the risk
#' that each individual experiences each acute consequence of drinking during one year
Expand Down Expand Up @@ -42,7 +44,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#'
Expand Down
3 changes: 2 additions & 1 deletion R/subgroupRisk.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#' Summarise relative risk
#'
#' \lifecycle{stable}
#'
#' Calculate the sum of the relative risk for all individuals in a subgroup,
#' or calculate the subgroup specific attributable fraction based on the current relative risks.
Expand All @@ -22,7 +24,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
#' \lifecycle{stable}
#'
#' @examples
#' \dontrun{
Expand Down
9 changes: 9 additions & 0 deletions R/tobalcepi-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#' @keywords internal
"_PACKAGE"

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
#' @importFrom lifecycle deprecate_soft
## usethis namespace: end
NULL
6 changes: 4 additions & 2 deletions man/AlcBinge.Rd

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

8 changes: 5 additions & 3 deletions man/AlcBinge_stapm.Rd

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

6 changes: 4 additions & 2 deletions man/AlcLags.Rd

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

4 changes: 3 additions & 1 deletion man/ExpandCodes.Rd

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

6 changes: 4 additions & 2 deletions man/PArisk.Rd

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

4 changes: 2 additions & 2 deletions man/RRFunc.Rd

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

4 changes: 3 additions & 1 deletion man/RRTobDR.Rd

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

4 changes: 3 additions & 1 deletion man/RRalc.Rd

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

4 changes: 3 additions & 1 deletion man/RRtob.Rd

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

Loading

0 comments on commit db9e878

Please sign in to comment.