Too many imports in babsim.hospitalvis
-
Imports includes 23 non-default packages.
- Importing from so many packages makes the package vulnerable to any of them becoming unavailable. Move as many as possible to Suggests and use conditionally.
-
Requires orphaned package: ‘plotly’
- Solved in SPOT as follows:
if (requireNamespace("plotly", quietly=TRUE)) {
# package plotly in Suggests
p <- plotly::add_trace(p, data=points1,x=points1[,1],z=points1[,3],y=points1[,2], mode = "markers", type = "scatter3d",
marker = list(size = 5, color = col1, symbol = 200))
} else {
warning("Would need plotly for add_trace")
}