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

addign x y axis limit, good to go #187

Merged
merged 6 commits into from
Sep 3, 2024
Merged

addign x y axis limit, good to go #187

merged 6 commits into from
Sep 3, 2024

Conversation

shajoezhu
Copy link
Contributor

close #183

replace #184

Copy link
Contributor

github-actions bot commented Aug 28, 2024


🎉 Thank you for your contribution! Before this PR can be accepted, we require that you all read and agree to our Contributor License Agreement.
You can digitally sign the CLA by posting a comment on this Pull Request in the format shown below. This agreement will apply to this PR as well as all future contributions on this repository.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (shajoezhu)[https://github.com/shajoezhu]
@jwang-lilly
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@shajoezhu
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

github-actions bot commented Aug 28, 2024

badge

Code Coverage Summary

Filename               Stmts    Miss  Cover    Missing
-------------------  -------  ------  -------  ----------
R/assert_data.R           63       0  100.00%
R/covariance_plot.R       52       5  90.38%   41, 84-87
R/fit_mmrm.R              44       0  100.00%
R/formula.R               45       0  100.00%
R/g_mmrm.R               314       7  97.77%   66-71, 306
R/labels.R                23       0  100.00%
R/lsmeans.R              205       0  100.00%
R/subgroups.R            265       0  100.00%
R/tabulate_mmrm.R         83       0  100.00%
R/utils.R                  4       0  100.00%
TOTAL                   1098      12  98.91%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  -------
R/g_mmrm.R       +1       0  +0.01%
TOTAL            +1       0  +0.00%

Results for commit: 249260e

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Aug 28, 2024

Unit Tests Summary

  1 files   11 suites   17s ⏱️
110 tests  81 ✅ 29 💤 0 ❌
219 runs  178 ✅ 41 💤 0 ❌

Results for commit 249260e.

♻️ This comment has been updated with latest results.

@shajoezhu
Copy link
Contributor Author

library(dplyr)
library(tern.mmrm)

adsl <- random.cdisc.data::cadsl
adqs <- random.cdisc.data::cadqs

adqs_f <- adqs %>%
dplyr::filter(PARAMCD == "FKSI-FWB" & !AVISIT %in% c("BASELINE")) %>%
droplevels() %>%
dplyr::mutate(ARM = factor(ARM, levels = c("B: Placebo", "A: Drug X", "C: Combination"))) %>%
dplyr::mutate(AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor())

mmrm_results <- fit_mmrm(
vars = list(
response = "AVAL",
covariates = c("STRATA2"),
id = "USUBJID",
arm = "ARM",
visit = "AVISIT"
),
data = adqs_f
)

plot <- g_mmrm_lsmeans(
mmrm_results,
select = "estimates",
xlab = "Visit"
#, ylimits = c(30, 90)
)
plot

image

plot2 <- g_mmrm_lsmeans(
     mmrm_results,
     select = "estimates",
     xlab = "Visit", ylimits = c(30, 90), xlimits = factor(c("WEEK 1 DAY 8", "WEEK 4 DAY 29"), levels = c("SCREENING", "WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 3 DAY 22", "WEEK 4 DAY 29", "WEEK 5 DAY 36"))
)
plot2

image

@shajoezhu shajoezhu enabled auto-merge (squash) August 28, 2024 14:51
@shajoezhu shajoezhu changed the title Jwang main addign x y axis limit, good to go Sep 2, 2024
Copy link
Contributor

@edelarua edelarua left a comment

Choose a reason for hiding this comment

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

Lgtm!

@shajoezhu shajoezhu merged commit 0723d05 into main Sep 3, 2024
25 of 26 checks passed
@shajoezhu shajoezhu deleted the jwang-main branch September 3, 2024 02:16
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: enable setting axis limits
3 participants