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

No non-missing arguments to max; returning -Inf #339

Closed
nanxstats opened this issue Feb 16, 2024 · 3 comments · Fixed by #495
Closed

No non-missing arguments to max; returning -Inf #339

nanxstats opened this issue Feb 16, 2024 · 3 comments · Fixed by #495
Labels
bug Something isn't working

Comments

@nanxstats
Copy link
Collaborator

nanxstats commented Feb 16, 2024

Run the following example from ?as_gt()

gs_power_wlr() %>%
  summary() %>%
  as_gt(
    colname_spanner = "Cumulative probability to cross boundaries",
    colname_spannersub = c("under H1", "under H0")
  )

yields the following warning message:

Warning message:
  In max((x %>% dplyr::filter(Bound == display_bound[1]))[[colname_spannersub[2]]]) :
  no non-missing arguments to max; returning -Inf

For this reason, suppressWarnings() had to be used in as_gt() tests in #337 to keep test outputs clean.

@nanxstats nanxstats added the bug Something isn't working label Feb 16, 2024
@LittleBeannie
Copy link
Collaborator

The message is from https://github.com/Merck/gsDesign2/blob/main/R/as_gt.R#L255, which was originally re-org by @yihui.

@nanxstats, @yihui and @jdblischak, Is anyone available to volunteer to handle this?

@yihui
Copy link
Contributor

yihui commented Jan 9, 2025

I'll take a look.

@yihui
Copy link
Contributor

yihui commented Jan 11, 2025

Fixed in #495.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants