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

update roxygen header of 3 r files with examples #38

Merged
merged 18 commits into from
Sep 1, 2023

Conversation

hoppanda
Copy link
Member

No description provided.

@hoppanda hoppanda linked an issue Aug 18, 2023 that may be closed by this pull request
1 task
@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2023

badge

Code Coverage Summary

Filename                   Stmts    Miss  Cover    Missing
-----------------------  -------  ------  -------  --------------------
R/bucher.R                    22       9  59.09%   37, 63-72
R/data_generation.R           20      20  0.00%    36-73
R/maic_unanchored_tte.R       85      85  0.00%    25-164
R/matching.R                 203     181  10.84%   35-102, 121, 163-419
R/process_data.R             101     101  0.00%    39-275
R/survival-helper.R          140     140  0.00%    14-255
TOTAL                        571     536  6.13%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  --------
R/matching.R              +8     -10  +8.79%
R/survival-helper.R       +1      +1  +100.00%
TOTAL                     +9      -9  +3.10%

Results for commit: ad2979c

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2023

Unit Tests Summary

3 tests   3 ✔️  0s ⏱️
2 suites  0 💤
1 files    0

Results for commit 45c8412.

♻️ This comment has been updated with latest results.

R/matching.R Outdated
@@ -294,62 +311,18 @@ plot.maicplus_estimate_weights <- function(x, ggplot = FALSE,
#' @param processed_agd a data frame, object returned after using \code{\link{process_agd}} or
#' aggregated data following the same naming convention
#'
#' @examples
#' load(system.file("extdata", "agd.rda", package = "maicplus", mustWork = TRUE))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeJSeo Do you have the code to generate agd.rda? Could you add the code in data-raw/agd.R

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I just stored this data.frame manually:
agd <- data.frame(
STUDY = "Lung study",
ARM = "Total",
N = 300,
AGE_MEAN = 51,
AGE_MEDIAN = 49,
AGE_SD = 3.25,
SEX_MALE_PROP = 147/300,
ECOG0_PROP = 0.40,
ECOG0_COUNT = 40,
SMOKE_PROP = 58/(300-5),
N_PR_THER_MEDIAN = 2
)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need agd.rda? Let's just do this?
target_pop <- read.csv(system.file("extdata","aggregate_data_example_1.csv", package = "maicplus", mustWork =
agd <- process_agd(target_pop)

R/survival-helper.R Outdated Show resolved Hide resolved
R/matching.R Outdated
@@ -294,62 +311,18 @@ plot.maicplus_estimate_weights <- function(x, ggplot = FALSE,
#' @param processed_agd a data frame, object returned after using \code{\link{process_agd}} or
#' aggregated data following the same naming convention
#'
#' @examples
#' load(system.file("extdata", "agd.rda", package = "maicplus", mustWork = TRUE))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I just stored this data.frame manually:
agd <- data.frame(
STUDY = "Lung study",
ARM = "Total",
N = 300,
AGE_MEAN = 51,
AGE_MEDIAN = 49,
AGE_SD = 3.25,
SEX_MALE_PROP = 147/300,
ECOG0_PROP = 0.40,
ECOG0_COUNT = 40,
SMOKE_PROP = 58/(300-5),
N_PR_THER_MEDIAN = 2
)

R/matching.R Outdated
@@ -294,62 +311,18 @@ plot.maicplus_estimate_weights <- function(x, ggplot = FALSE,
#' @param processed_agd a data frame, object returned after using \code{\link{process_agd}} or
#' aggregated data following the same naming convention
#'
#' @examples
#' load(system.file("extdata", "agd.rda", package = "maicplus", mustWork = TRUE))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need agd.rda? Let's just do this?
target_pop <- read.csv(system.file("extdata","aggregate_data_example_1.csv", package = "maicplus", mustWork =
agd <- process_agd(target_pop)

@gravesti gravesti merged commit 7aabd6c into main Sep 1, 2023
20 of 22 checks passed
@gravesti gravesti deleted the 29-add-examples-to-functions branch September 1, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

add examples to functions
3 participants