RinteRface / argonDash

argon dashboard template
https://rinterface.github.io/argonDash/
138 stars 37 forks source link

argonDashGallery() "no file found" #26

Closed mgei closed 4 years ago

mgei commented 4 years ago

I cannot load argonDashGallery()

> argonDash::argonDashGallery()
Loading required namespace: magrittr
Error in system.file(paste0("examples/app.R"), package = "argonDash",  : 
  no file found

R.version _
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29) nickname Holding the Windsock

I also tried it on my Windows machine and run into the same problem.

patarol commented 4 years ago

Same here. It doesn't work:

library(argonDash)
argonDashGallery()
#Error in system.file(paste0("examples/app.R"), package = "argonDash",  : 
  no file found
patarol commented 4 years ago

Hey @mgei I've managed to make ir work by changing the function that calls the app.R.

argonDashGallery <-  function() {

  if (!requireNamespace(package = "magrittr")) 
    message("Package 'magrittr' is required to run this function")

  shiny::shinyAppFile(file.path(.libPaths(), 'argonDash/examples/gallery/app.R'))
}

argonDashGallery()

@DivadNojnarg if you allow me I can make a new Pull Request.

oujbih commented 4 years ago
argonDashGallery <- function() { # nocov start
  if (!requireNamespace(package = "magrittr"))
    message("Package 'magrittr' is required to run this function")

  shiny::shinyAppFile(
    system.file(
      paste0("examples/gallery/app.R"), 
      package = 'argonDash', 
      mustWork = TRUE
    )
  )
}
argonDashGallery()

it work for me

patarol commented 4 years ago

@oujbih wich OS are you using with? Mac OS I'm using. system.file takes me to base package directory.

oujbih commented 4 years ago

@patarol windows 10