Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes from first package review #92

Merged
merged 17 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,55 @@ Package: vaccineff
Title: Estimate Vaccine Effectiveness Based on Different Study Designs
Version: 0.0.4
Authors@R: c(
person(given = "David Santiago", family = "Quevedo", email = "[email protected]", role = c("aut"),
comment = c(ORCID = "0000-0003-1583-4262")),
person(given = "Zulma M.", family = "Cucunubá", email = "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8165-3198")),
person("International Development Research Center (IDRC)", role = c("fnd")),
person(given = "Geraldine", family = "Gómez Millán", email = "[email protected]", role = c("ctb"),
comment = c(ORCID = "0009-0007-8701-0568")),
person(given = "Pratik", family = "Gupte", email = "[email protected]", role = c("ctb"),
comment = c(ORCID = "0000-0001-5294-7819")),
person(given = "Érika J", family = "Cantor", email = "[email protected]", role = c("ctb"),
comment = c(ORCID = "0000-0003-3320-6032")),
person(given = "Santiago", family = "Loaiza", email = "[email protected]", role = c("ctb"),
comment = c(ORCID = "0000-0002-2092-3262")),
person(given = "Jaime", family = "Pavlich-Mariscal", email = "[email protected]", role = c("ctb"),
person("David Santiago", "Quevedo", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-1583-4262")),
person("Zulma M.", "Cucunubá", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8165-3198")),
person("International Development Research Center (IDRC)", role = "fnd"),
person("Geraldine", "Gómez Millán", , "[email protected]", role = "ctb",
comment = c(ORCID = "0009-0007-8701-0568")),
person("Pratik", "Gupte", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0001-5294-7819")),
person("Érika J", "Cantor", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0003-3320-6032")),
person("Santiago", "Loaiza", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-2092-3262")),
person("Jaime", "Pavlich-Mariscal", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-3892-6680")),
person(given = "Hugo", family = "Gruson", email = "[email protected]", role = c("ctb"),
person("Hugo", "Gruson", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-4094-1476")),
person(given = "Chris", family = "Hartgerink", email = "[email protected]", role = "ctb",
person("Chris", "Hartgerink", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0003-1050-6809")),
person(given = "Felipe Segundo", family = "Abril", email = "[email protected]", role = "ctb",
person("Felipe Segundo", "Abril", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-2512-4929"))
)
Description: Tools for estimating vaccine effectiveness and vaccine related metrics.
URL: https://github.com/epiverse-trace/vaccineff, https://epiverse-trace.github.io/vaccineff/
BugReports: https://github.com/epiverse-trace/vaccineff/issues
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends:
R (>= 3.5.0)
Imports:
survival,
stats,
checkmate,
ggplot2,
scales,
rlang,
linelist,
MatchIt,
linelist
rlang,
scales,
stats,
survival
Suggests:
knitr,
qtl,
rmarkdown,
spelling,
testthat (>= 3.0.0),
qtl
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Config/Needs/website:epiverse-trace/epiversetheme
Config/testthat/edition: 3
Config/Needs/website:
epiverse-trace/epiversetheme
Encoding: UTF-8
Language: en-US
VignetteBuilder: knitr
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2023
YEAR: 2024
COPYRIGHT HOLDER: vaccineff authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 vaccineff authors
Copyright (c) 2024 vaccineff authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions R/coh_data_wrangling.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' the other hand, if the logical operator is `|`, it is enough to find one
#' column with information indicating success. It is recommended to use this
#' method when working with several outcomes or several vaccine doses. By
#' default, it returns a binary column where 0 means no outcome or no vaccine
#' default, it returns a binary column where `0` means no outcome or no vaccine
#' and `1` means the opposite. However, it can also receive custom
#' options, e.g., `c("v", "u")` for vaccinated and unvaccinated.
#'
Expand Down Expand Up @@ -297,7 +297,7 @@ adjust_time_to_event <- function(data_set) {

msg <- paste0("\nThe start date of the cohort was defined as",
" the mininimum immunization date. \n",
n0 - nf, " registers were removed with outocomes before the start date.\n"
n0 - nf, " registers were removed with outcomes before the start date.\n"
)
warning(msg)

Expand Down
4 changes: 2 additions & 2 deletions R/coh_immunization.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#'
#' The function also works with vaccination information spread across several
#' columns. If this is the case, the parameter `vacc_date_col` must be passed
#' as a vector with the names of all the columns to use (see example).
#' as a vector with the names of all the columns to use.
#' The function uses by default the latest date found. However, it can also
#' select the first date by setting `take_first = TRUE`.
#'
Expand All @@ -24,7 +24,7 @@
#' vaccine selected as immunizing. This information must be passed in the
#' parameter `vacc_name_col`, as a vector in the same order as `vacc_date_col`.
#'
#' @param data_set `data.frame` with cohort information (see example).
#' @param data_set `data.frame` with cohort information.
#' @param outcome_date_col Name of the column that contains the outcome dates.
#' @param censoring_date_col Name of the column that contains the censoring
#' date. NULL by default.
Expand Down
2 changes: 1 addition & 1 deletion R/coh_match.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' before their outcomes. Rolling calendar matching method will be included in
#' future releases.
#'
#' @param data_set `data.frame` with cohort information (see example).
#' @param data_set `data.frame` with cohort information.
#' @param outcome_date_col Name of the column that contains the outcome dates.
#' @param censoring_date_col Name of the column that contains the censoring
#' date. `NULL` by default.
Expand Down
11 changes: 4 additions & 7 deletions R/make_vaccineff_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' `vaccineff_data` that contains all the relevant information for the study.
#' to estimate the effectiveness.
#'
#' @param data_set `data.frame` with cohort information (see example).
#' @param data_set `data.frame` with cohort information.
#' @param outcome_date_col Name of the column that contains the outcome dates.
#' @param censoring_date_col Name of the column that contains the censoring
#' date. NULL by default.
Expand Down Expand Up @@ -101,19 +101,16 @@ make_vaccineff_data <- function(data_set,
end_cohort = end_cohort,
take_first = take_first
)
)
)

# Define linelist object
cohort_data <- linelist::set_tags(
x = cohort_data,
),
# here come the ... params
outcome_date_col = outcome_date_col,
censoring_date_col = censoring_date_col,
vacc_date_col = vacc_date_col,
vacc_name_col = vacc_name_col,
immunization_date_col = "immunization_date",
vacc_status_col = "vaccine_status",
allow_extra = TRUE

)

# Define start date of the cohort
Expand Down
4 changes: 2 additions & 2 deletions R/utils_coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' records for some dates, the function assigns 0 instead of NA to calculate
#' the cumulative coverage.
#'
#' @param data_set `data.frame` with cohort information (see example).
#' @param data_set `data.frame` with cohort information.
#' @param vacc_date_col Name of the column(s) that contain the vaccine date to
#' calculate the coverage.
#' @param unit Aggregation unit, must be either "year", "month", or "day".
Expand Down Expand Up @@ -43,7 +43,7 @@ coh_coverage <- function(data_set,
)

# Create continuous date column
# For fixed intervals, use date_intervales
# For fixed intervals, use date_intervals
# In other case use min and max of data_set
if (is.null(date_interval)) {
start <- min(data_set[[vacc_date_col]], na.rm = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion man/adjust_time_to_event.Rd

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

2 changes: 1 addition & 1 deletion man/check_vaccineff_inputs.Rd

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

2 changes: 1 addition & 1 deletion man/coh_coverage.Rd

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

2 changes: 1 addition & 1 deletion man/get_immunization_date.Rd

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

2 changes: 1 addition & 1 deletion man/get_immunization_dose.Rd

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

2 changes: 1 addition & 1 deletion man/get_immunization_vaccine.Rd

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

2 changes: 1 addition & 1 deletion man/get_time_to_event.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/make_immunization.Rd

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

2 changes: 1 addition & 1 deletion man/make_vaccineff_data.Rd

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

2 changes: 1 addition & 1 deletion man/match_cohort.Rd

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

2 changes: 1 addition & 1 deletion man/match_cohort_.Rd

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

2 changes: 1 addition & 1 deletion man/match_pair_info.Rd

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

2 changes: 1 addition & 1 deletion man/set_event_status.Rd

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

2 changes: 1 addition & 1 deletion man/set_status.Rd

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

2 changes: 1 addition & 1 deletion man/static_match.Rd

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

2 changes: 1 addition & 1 deletion man/truncate_time_to_event.Rd

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

1 change: 0 additions & 1 deletion vignettes/vaccineff.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ The current release of the package bases the estimation of $VE$ in the cohort de
The integrated dataset `cohortdata` serves as a minimal example of the package's input. The data is accessed using `data("cohortdata")`.

`vaccineff` has three main functions:

1. `make_vaccineff_data`: This function returns an S3 object of the class `vaccineff_data` with the relevant information for the study. This function also allows to create a matched cohort to control for confounding variables by setting `match = TRUE` and passing the corresponding `exact` and `nearest` arguments.
`make_vaccineff_data` supports the method `summary()` to check the characteristics of the cohort, the matching balance and the sizes of matched, excluded, and removed populations.

Expand Down
Loading