Closed gabrielareto closed 1 year ago
Good point.
I added a run_app
to the package. so now, after isntalling it, the user should be able to run:
DataHarmonization::run_app()
and the app should run locally.
Can you try it @gabrielareto?
DataHarmonization::run_app() Error: 'run_app' is not an exported object from 'namespace:DataHarmonization'
did you re-install the package to get the latest version?
devtools::install_github("Alliance-for-Tropical-Forest-Science/DataHarmonization", build_vignettes = TRUE)
yes, with force = TRUE. Same error.
After restarting a session, this worked for me. Can you try again?
devtools::install_github("Alliance-for-Tropical-Forest-Science/DataHarmonization", build_vignettes = TRUE)
library(DataHarmonization)
library(shiny)
DataHarmonization::run_app()
devtools::install_github("Alliance-for-Tropical-Forest-Science/DataHarmonization", build_vignettes = TRUE) Downloading GitHub repo Alliance-for-Tropical-Forest-Science/DataHarmonization@HEAD ── R CMD build ──────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/private/var/folders/vx/k98504j95hsbr_vym28v2t7w0000gn/T/RtmpDkOJhu/remotesc66ea22d390/Alliance-for-Tropical-Forest-Science-DataHarmonization-8c36ae7/DESCRIPTION’ ... ─ preparing ‘DataHarmonization’: ✔ checking DESCRIPTION meta-information ... ─ installing the package to build vignettes ✔ creating vignettes (11.8s) ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘DataHarmonization_0.0.0.9000.tar.gz’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/setup_e2f8182b76baf87832dd16843283fe92.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_b44be9ca9520d443a1bdcb94ffca734f.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_b44be9ca9520d443a1bdcb94ffca734f.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_b44be9ca9520d443a1bdcb94ffca734f.rdx’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_af0e886682b7864f75ae7e3ea4b594fc.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_af0e886682b7864f75ae7e3ea4b594fc.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_af0e886682b7864f75ae7e3ea4b594fc.rdx’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_a5f6f6bea81e1cd0462e3dfce6790806.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_a5f6f6bea81e1cd0462e3dfce6790806.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_a5f6f6bea81e1cd0462e3dfce6790806.rdx’
library(DataHarmonization) library(shiny) DataHarmonization::run_app() Error: 'run_app' is not an exported object from 'namespace:DataHarmonization'
strange
I re-installed R and RStudio. A different problem now:
devtools::install_github("Alliance-for-Tropical-Forest-Science/DataHarmonization", build_vignettes = TRUE, force = TRUE) Downloading GitHub repo Alliance-for-Tropical-Forest-Science/DataHarmonization@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?
1: All
2: CRAN packages only
3: None
4: bslib (0.5.0 -> 0.5.1) [CRAN]
downloaded 4.8 MB
The downloaded binary packages are in /var/folders/vx/k98504j95hsbr_vym28v2t7w0000gn/T//RtmpG8ofr6/downloaded_packages ── R CMD build ────────────────────────────────────────────────────────────────── ✔ checking for file ‘/private/var/folders/vx/k98504j95hsbr_vym28v2t7w0000gn/T/RtmpG8ofr6/remotes14b2d669b9ed4/Alliance-for-Tropical-Forest-Science-DataHarmonization-8c36ae7/DESCRIPTION’ ... ─ preparing ‘DataHarmonization’: (418ms) ✔ checking DESCRIPTION meta-information ... ─ installing the package to build vignettes ✔ creating vignettes (12.1s) ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘DataHarmonization_0.0.0.9000.tar.gz’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/setup_0fe4c4a1f1b4e41096322f8086d470a3.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_e28bb78654b2e99912f7fadb6e406139.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_e28bb78654b2e99912f7fadb6e406139.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-2_e28bb78654b2e99912f7fadb6e406139.rdx’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_0f3b0b996d8c60f7787bf3c848d4b6f6.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_0f3b0b996d8c60f7787bf3c848d4b6f6.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-3_0f3b0b996d8c60f7787bf3c848d4b6f6.rdx’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_6ac260df89ce7225ee91aced7d3400e8.RData’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_6ac260df89ce7225ee91aced7d3400e8.rdb’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘DataHarmonization/vignettes/DataHarmonization_cache/html/unnamed-chunk-4_6ac260df89ce7225ee91aced7d3400e8.rdx’
library(DataHarmonization) library(shiny) DataHarmonization::run_app() Error in
shinyAppDir()
: ! No Shiny application exists at the path "inst/app" Runrlang::last_trace()
to see where the error occurred.
after installing again (devtools::install_github("Alliance-for-Tropical-Forest-Science/DataHarmonization", build_vignettes = TRUE, force = TRUE)) and updating all packages, these are the errors I get:
library(DataHarmonization) library(shiny) Error in value[3L] : Package ‘shiny’ version 1.7.4.1 cannot be unloaded: Error in unloadNamespace(package) : namespace ‘shiny’ is imported by ‘miniUI’, ‘DataHarmonization’ so cannot be unloaded DataHarmonization::run_app() Loading required package: shiny Failed with error: ‘Package ‘shiny’ version 1.7.4.1 cannot be unloaded: Error in unloadNamespace(package) : namespace ‘shiny’ is imported by ‘miniUI’, ‘DataHarmonization’ so cannot be unloaded ’ Error in
shinyAppDir()
: ! No Shiny application exists at the path "app" Runrlang::last_trace()
to see where the error occurred. rlang::last_trace() <error/invalidShinyAppDir> Error inshinyAppDir()
: ! No Shiny application exists at the path "app"Backtrace: ▆
- └─DataHarmonization::run_app()
- └─shiny::runApp("app")
- ├─shiny::as.shiny.appobj(appDir)
- └─shiny:::as.shiny.appobj.character(appDir)
- └─shiny::shinyAppDir(x) Run rlang::last_trace(drop = FALSE) to see 1 hidden frame.
this should work now, can you check @gabrielareto ?
Yes, it works! Now I understand... the string "app" was not enough to locate the local directory with the app, in contrast with the remote execution that we had before.
Thanks!
is there any alternative to "shiny::runGithub"? Sometimes we cannot launch the app because timeouts and things like that. Once the package is installed, Shouldn't we be able to run the app without internet connection? Completely locally.
the online version is not being used very often in the ForestGEO workshop in Panama.