使用 Photon 的 R Shiny 独立应用程序

标签 r shiny photon

我正在寻找一种从 Shiny App 创建独立应用程序的简单方法。我第一次看到 Katie 的“Shiny meet electron”演讲(见谷歌)。浏览了他们的网站后,我认为 Photon 是他们最新的方法!
我试图以最简单的方式测试 Photon,但没有成功。

To test Photon, I did the following:

1. install node.js (works, tested 'npm' in CMD line, recognised)

2. install git (works, tested 'git' in CMD line, recognised)

3. install Photon using your instructions

4. Open new basic shinyApplications: RStudio > File > New file > Shiny Web App... >>
--> Name 'PhotonTestApp'
--> multiple fFIle (ui.R/server.R)
--> C:/ShinyApps
Tested to see the app works, the basic Geyser data app.

5. setwd("C:\ShinyApps\PhotonTestApp\")

6. Launch Photon app builder
--> Shiny App Directory: C:/ShinyApps/temp
--> left default NULL in all three package inputs
--> Build
我收到以下错误:
> photon:::photon_rstudioaddin()
Listening on http://127.0.0.1:3898
[1] "Selected directory: "
[1] "Selected directory: C:/ShinyApps/temp"
Running Photon
Warning in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:\ShinyApps\temp/electron-quick-start": The system cannot find the file specified
我看到创建了一个目录:C:\ShinyApps\temp\electron-quick-start\带有一个空的隐藏 .git 目录。
非常感谢任何帮助!
附注。其他简单的方法也很受欢迎!
一些额外的信息:
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 
LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shiny_1.5.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 rstudioapi_0.11 magrittr_1.5 xtable_1.8-4 R6_2.4.1 rlang_0.4.7 fastmap_1.0.1 stringr_1.4.0 tools_3.6.3
[10] photon_0.0.1 miniUI_0.1.1.1 withr_2.2.0 htmltools_0.5.0 shinyFiles_0.8.0 ellipsis_0.3.1 digest_0.6.25 tibble_3.0.3 lifecycle_0.2.0
[19] crayon_1.3.4 later_1.1.0.1 vctrs_0.3.2 promises_1.1.1 fs_1.4.2 rsconnect_0.8.16 glue_1.4.1 mime_0.9 stringi_1.4.6
[28] compiler_3.6.3 pillar_1.4.6 shinyBS_0.61 jsonlite_1.7.0 httpuv_1.5.4 pkgconfig_2.0.3

最佳答案

打开 git cmd
将目录更改为 app.r 文件夹
然后运行以下命令:
git 克隆 https://github.com/ColumbusCollaboratory/electron-quick-start
之后从 rstudio 启动 photon app builder 并选择 app.r 的目录,该目录现在也应该有“electron-quick-start”目录

关于使用 Photon 的 R Shiny 独立应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63106904/

相关文章:

android - 在Android上从Particle Photon触发音频

c# - Photon Server新手问题

unity-game-engine - 光子语音上的回声。即使在演示中

r - 意外的venneuler输出

r - 面板数据回归 : Robust standard errors

r - cols 在 Shiny 应用程序的 Tags$textarea 中不起作用

r - 在 R Datatable Shiny 应用程序中单击按钮时,模态仅打开一次

r - 单击 map 后,ObserveEvent 不会打印出图层 ID

r - 如何使用 R 按模式识别列并将其转换为日期时间?

r - 生成 "better"带有人为波动、潮起潮落的随机数据