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

lifecycle warning #8

Closed
amandalbradford opened this issue Jun 6, 2023 · 3 comments
Closed

lifecycle warning #8

amandalbradford opened this issue Jun 6, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@amandalbradford
Copy link

Aloha Sam -

I got a warning using the function das_sight today (oddly, didn't get it yesterday) as follows:
Returning more (or less) than 1 row per summarise() group was deprecated in dplyr 1.1.0.
ℹ Please use reframe() instead.
ℹ When switching from summarise() to reframe(), remember that reframe() always returns
an ungrouped data frame and adjust accordingly.
ℹ The deprecated feature was likely used in the swfscDAS package.
Please report the issue at https://github.com/smwoodman/swfscDAS/issues/.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.

When I called the warning, it showed:
Backtrace:

  1. ├─swfscDAS::das_sight(y.proc, return.format = "default")
  2. ├─swfscDAS:::das_sight.das_df(y.proc, return.format = "default")
  3. │ └─... %>% ...
  4. ├─dplyr::summarise(...)
  5. └─dplyr:::summarise.grouped_df(...)
  6. └─dplyr:::summarise_deprecate_variable_size()

Is this ringing a bell? I haven't dug in to understand potential issues, but I wanted to pass it on.

Thanks!
amanda

@smwoodman smwoodman added the bug Something isn't working label Jun 6, 2023
@smwoodman
Copy link
Owner

Ooh, thanks Amanda!

This warning is referencing the new tidyverse function reframe. What this is telling me is that on this das_sight run, one of the group_by - summarise workflows ended up having multiple lines for one of the summarise outputs. Prior to reframe, summarise would have just through an error, so this isn't something that happens normally when processing. Thus, I doubt this is desired, and is probably due to either a bug in the code or something interesting in the DAS file.

If possible, could you email me the file you were using when you ran this so I can try and reproduce this?

@amandalbradford
Copy link
Author

Sure, Sam, will email you now! Thank you!

@smwoodman
Copy link
Owner

Hi @amandalbradford, this warning was because there was no '?' event types in this specific DAS file. The das_sight code summarizes different event types in different code chunks, and the code summarizing '?' events used summarise and thus expected there to always be one row. Because there were no such events, there were zero rows, and it threw the warning you saw.

das_sight now uses reframe where applicable for these summary operations to allow for situations like this where a specific event type is not present. Let me know if this warning pops up anywhere else!

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

No branches or pull requests

2 participants