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
In my use case, I'm displaying a Leaflet Map R Object created in one environment in a Shiny dashboard in a different environment. There is considerably processing that happens to create the Leaflet Map R Object, which is not suitable for the dashboard deployment environment.
In plugin-providers.R and other files the absolute paths of the dependencies (e.g. /Library/Frameworks/R.framework/Versions/3.4/Resources/library/leaflet/htmlwidgets/lib/leaflet-providers) are written into the object:
Trying to load a map object created on one platform on different platform produces errors like the following:
Error in normalizePath: path[1]="/Library/Frameworks/R.framework/Versions/3.4/Resources/library/leaflet/htmlwidgets/lib/leaflet-providers": No such file or directory
Stack trace (innermost first):
83: h
82: .handleSimpleError
81: normalizePath
80: addResourcePath
79: FUN
78: lapply
77: origRenderFunc
76: output$scores_map
75: ..stacktraceon..
...
1: runApp
To prevent this error, store the relative path of the dependency rather than the absolute path. Currently, my work-around when loading a saved map object looks like (this is not a good solution, but works for my needs):
data("my_map.Rda") # reads in my_map, a stored Leaflet Map Object# fix an isssue where these dependencies are hard coded in the stored R objectsmy_map$dependencies[[1]]$src$file<- normalizePath(paste0(.libPaths()[1], "/leaflet/htmlwidgets/lib/leaflet-providers"))
my_map$dependencies[[2]]$src$file<- normalizePath(paste0(.libPaths()[1], "/leaflet/htmlwidgets/plugins/leaflet-providers-plugin"))
Thanks!
The text was updated successfully, but these errors were encountered:
In my use case, I'm displaying a Leaflet Map R Object created in one environment in a Shiny dashboard in a different environment. There is considerably processing that happens to create the Leaflet Map R Object, which is not suitable for the dashboard deployment environment.
In
plugin-providers.R
and other files the absolute paths of the dependencies (e.g./Library/Frameworks/R.framework/Versions/3.4/Resources/library/leaflet/htmlwidgets/lib/leaflet-providers
) are written into the object:Trying to load a map object created on one platform on different platform produces errors like the following:
To prevent this error, store the relative path of the dependency rather than the absolute path. Currently, my work-around when loading a saved map object looks like (this is not a good solution, but works for my needs):
Thanks!
The text was updated successfully, but these errors were encountered: