Skip to content

Commit

Permalink
No more setwd
Browse files Browse the repository at this point in the history
  • Loading branch information
Adafede committed Jul 3, 2024
1 parent d1d2cfb commit eb46e4e
Show file tree
Hide file tree
Showing 4 changed files with 699 additions and 675 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Imports:
tidyfst (>= 1.7.9),
utils,
visNetwork (>= 2.1.2),
withr (>= 3.0.0),
yaml (>= 2.3.8)
Suggests:
BiocManager,
Expand Down
15 changes: 14 additions & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,19 @@
"sameAs": "https://CRAN.R-project.org/package=visNetwork"
},
"37": {
"@type": "SoftwareApplication",
"identifier": "withr",
"name": "withr",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=withr"
},
"38": {
"@type": "SoftwareApplication",
"identifier": "yaml",
"name": "yaml",
Expand All @@ -578,7 +591,7 @@
"SystemRequirements": null
},
"keywords": ["metaboliteannotation", "chemotaxonomy", "scoringsystem", "naturalproducts", "computationalmetabolomics", "taxonomicdistance", "specializedmetabolome"],
"fileSize": "4376.027KB",
"fileSize": "4377.449KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
30 changes: 15 additions & 15 deletions inst/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -2070,18 +2070,18 @@ server <- function(input, output, session) {
}
url <- "<http://127.0.0.1:3838>"
log_debug("Please, open:", url, "on your favorite browser, but not Edge.")
shinyApp(
ui = ui,
server = server,
onStart = function() {
if (i_am_a_whale) {
message("I\'m inside the matrix ;(")
setwd(dir = "..")
} else {
cache <- fs::path_home(".tima")
fs::dir_create(cache)
message("Working in ", cache)
setwd(dir = cache)
}
}
)
dir <- if (i_am_a_whale) {
message("I\'m inside the matrix ;(")
".."
} else {
cache <- fs::path_home(".tima")
fs::dir_create(cache)
message("Working in ", cache)
cache
}
withr::with_dir(new = dir, code = {
shinyApp(
ui = ui,
server = server
)
})
Loading

0 comments on commit eb46e4e

Please sign in to comment.