rstudio / promises

A promise library for R
https://rstudio.github.io/promises
Other
197 stars 19 forks source link

Unhandled promise error: `quo` must be a quosure #82

Open gdeoli opened 2 years ago

gdeoli commented 2 years ago

Hi,

I'm trying to handle an expression within future_promise, but I'm getting this Unhandled promise error: quo must be a quosure error. Could anyone explain why this message is appearing and whether there is a way to rewrite the following code, to get the mutate statement within the future_promise function?

fraserData <- reactiveValues(fraserDT = NULL, visibility = FALSE)
foo <- reactive({
   path <- MyPath()
   future_promise({ read_tsv(path) %>%
     mutate(significantDelta = case_when(
      padjust < pValueCutoff & abs(deltaPsi) >= deltaPsiCutoff ~ "p-value and delta",
      padjust < pValueCutoff & abs(deltaPsi) < deltaPsiCutoff ~ "p-value",
      padjust >= pValueCutoff & abs(deltaPsi) >= deltaPsiCutoff ~ "delta",
      padjust >= pValueCutoff ~ "NS"
    ))}) %>% then(function(value) {
            fraserData$fraserDT <<- value
            fraserData$visibility <<- TRUE
           })
NULL
 })