首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用带有“未来()”的本地` `golem`‘包?

如何使用带有“未来()”的本地` `golem`‘包?
EN

Stack Overflow用户
提问于 2022-09-19 15:17:57
回答 1查看 60关注 0票数 0

TL;博士

当本地软件包不在我的win库中时,如何从我正在运行的闪亮应用程序中引用/使用它呢?

错误:

Warning: Error in : there is no package called 'humblFinance'

伪码:

代码语言:javascript
复制
 output$p1 <- renderPlot({

            future::future({
            out   <- myPackage::collect_price(symbol = input$tickerInput,
                                                 range = "1m")
            input <- input
                out   <- out %>%
                    ggplot2::ggplot(ggplot2::aes(x = date, y = fclose)) +
                    ggplot2::geom_line(size = 1) +
                    ggplot2::labs(title = glue::glue("{input$tickerInput} Price Chart"), y = "Closing Price", x = "")
                return(out)
            }) %...>% (
                function(result){ return(result) }
            ) %...!% (
                function(error){ warning(error) }
            )
        })

当我试图在mypackage::myfun()中使用函数future({}) statement时,我会收到下面的错误。我的shinyApp是用golembrochure基础设施创建的,所以我不知道在哪里引用这个包?我尝试过在语句中安装软件包,但似乎不起作用。我是否应该将将来的调用指向项目根目录中的tarball?

  1. loadNamespace()没有work
  2. attatchNamespace()没有work
  3. remotes::install_local()没有工作
EN

回答 1

Stack Overflow用户

发布于 2022-09-27 05:06:22

你在这篇文章中试过答案吗:

I get an error when using {future} and {furrr} functions within a Golem Shiny App, what does it come from?

这个解决方案对我没有用,但似乎对这篇文章的作者有效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73775719

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档