I have the following Shiny package:
DESCRIPTION
:
Package: mypackage
Version: 0.0.1
Depends: shiny
R/mypackage.R
:
ui <- shiny::fluidPage(getwd())
server <- function(input, output, session) {}
To install and run, I do
R -q -e "devtools::install(); shiny::runApp(shinyApp(mypackage:::ui, mypackage:::server))"
And when I do this, my app outputs
/tmp/RtmpC1viCa/R.INSTALL6931e8be933/mypackage
which does not exist.
Why is that, and how I improve that? I have seen that getwd()
may not actually return the users working directory - but why is it returning a non-existent one?