-
Notifications
You must be signed in to change notification settings - Fork 57
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
Using lazy_dt()
Inside of a Shiny App Throws Errors in Reactive Contexts
#260
Comments
This is almost certainly a bug; until it's fixed you might be able to work around it by changing |
That worked! Thank you, Hadley! (Sort of) Minimal working reprex:
Curiously, |
I wasn't sure whether to report this to
rstudio/shiny
or here, but since regulardplyr
code is fine in my reactive sections, I'm pretty sure that it'sdtplyr
that's causing this issue, and not Shiny.I've tried to make as minimal of a Shiny app to reproduce this, while incorporating some reactivity, as the reactivity is where I'm encountering these errors.
Both of the following code blocks run completely fine when regular
dplyr
code is used withoutlazy_dt()
.The error thrown depends on if
group_by()
is used or not. I'll demonstrate both errors.Here's without
group_by()
:This throw an error of
Error: invalid subscript type 'closure'
.And if I basically do the same thing with
group_by()
:This throws an error of
Error: object 'input' not found
.Lastly, no errors are thrown if no
dplyr
verbs are used except for something likecollect()
afterlazy_dt()
.I would like to not have to use
data.table
explicitly, as varioustidyselect
verbs andacross()
are too useful to give up in certain circumstances.For now I'm leveraging
dtplyr
for most of my pre-processing needs, and just leaving it to regulardplyr
code in any reactive elements.Thanks for any help!
The text was updated successfully, but these errors were encountered: