You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TLDR is: add explicit namespacing pkg::dataset to your dataset, because pkg::function() doesn't have access to the dataset before you library("pkg").
Hey Colin I think it's because datasets under data/ are not stored in the package's namespace but in the lazydata env.
When calling library you make them visible because they're copied in the package env on the search path, this is brittle however if you use data from the package, because the global environment could override those.
I have a golem shiny app that reads from a dataset and returns a table.
So in the
ui
I havetableOutput(outputId = "head")
, and in the server I havewhere
x
is theiris
dataset stored in thedata
folder withusethis::use_data
.I am installing it with
devtools::install()
. When I domyapp::run_app()
I get an error:When I change the line
dataset <- head(x)
to
dataset <- head(myapp::x)
and reinstallmyapp::run_app()
runs successfully.Again, I am not sure if maybe I am doing something wrong with the golem setup, or this is how it is supposed to be.
The text was updated successfully, but these errors were encountered: