Skip to content

Add exclude_rows argument to g_forest() (Solves #1498). - #1503

Open
wwojciech wants to merge 2 commits into
pharmaverse:mainfrom
wwojciech:1498_g_forest()_exclude_rows
Open

Add exclude_rows argument to g_forest() (Solves #1498).#1503
wwojciech wants to merge 2 commits into
pharmaverse:mainfrom
wwojciech:1498_g_forest()_exclude_rows

Conversation

@wwojciech

Copy link
Copy Markdown
Contributor

Fixes #1498

@wwojciech

Copy link
Copy Markdown
Contributor Author

Hi @gmbecker - I created this PR following your advice. However, I noticed that some of the checks are failing during the CLA step.

@gmbecker, @danielinteractive - could you add yourselves as reviewers for this PR?

@danielinteractive danielinteractive left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @wwojciech , please see comments below

Comment thread R/g_forest.R Outdated
Comment thread R/g_forest.R Outdated
Comment thread R/g_forest.R Outdated
Comment thread R/g_forest.R
Comment thread R/g_forest.R
@wwojciech

Copy link
Copy Markdown
Contributor Author

Thanks, @danielinteractive - I replied to your questions. Regarding the other suggestion, I will apply it soon, as you suggested.

@danielinteractive danielinteractive left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, thanks @wwojciech !

@wwojciech

Copy link
Copy Markdown
Contributor Author

Looks good to me, thanks @wwojciech !

Thank you @danielinteractive . Can you pl. merge it? I have no writing rights.

@danielinteractive

Copy link
Copy Markdown
Collaborator

@wwojciech I cannot either. @Melkiades and @shajoezhu , could you help us?

Comment thread R/g_forest.R

tbl_df <- as_result_df(tbl)
if (!is.null(exclude_rows)) {
tbl_df <- tbl_df[-exclude_rows, ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not understand the need of this parameter inside this function when you can add the filtering before the input i.e. doing tbl_df <- tbl_df[-exclude_rows, ] just before running g_forest()

The rest is fine, it makes the function more stable ^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tbl_df <- tbl_df[-exclude_rows, ]

The issue is that using g_forest(tbl[-exclude_rows, ]) removes rows from the table itself. The intention is to keep these rows visible in the table while only excluding them from the forest plot.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It makes sense! sorry I had to double check its behavior again ^^ then it is is good to go!

@wwojciech
wwojciech requested a review from Melkiades August 6, 2026 17:01

@Melkiades Melkiades left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm! Thanks @wwojciech. Could you only fix cicd?

@wwojciech

wwojciech commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Lgtm! Thanks @wwojciech. Could you only fix cicd?

Thanks a lot, @Melkiades! Actually, I think the CI/CD is failing because I'm merging from a forked repository. I have no idea how to solve it. Maybe it's because my repository is named tern_ww instead of tern? But I would expect forked repositories to be allowed to have different names.

Is there anyone who could help me with this? Thanks!

@shajoezhu

Copy link
Copy Markdown
Contributor

hi @wwojciech , can you try rename the branch wwojciech:1498_g_forest_exclude_rows , and raise another PR, and let's see. it feels like an cicd with branch naming issue. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Allow excluding rows from the g_forest().

4 participants