marcmenem / ggshadow

A collection of geoms for R's 'ggplot2' library. geom_shadowpath(), geom_shadowline(), geom_shadowstep() and geom_shadowpoint() functions draw a shadow below lines to make busy plots more aesthetically pleasing. geom_glowpath(), geom_glowline(), geom_glowstep() and geom_glowpoint() add a neon glow around lines to get a steampunk style.
GNU General Public License v2.0
60 stars 5 forks source link

calls to getFromNamespace #5

Open marcmenem opened 2 years ago

marcmenem commented 2 years ago

try to avoid getFromNamespace as recommended by https://www.tidyverse.org/blog/2022/09/playing-on-the-same-team-as-your-dependecy/

elipousson commented 1 year ago

I figured I should comment over here rather than discussing this issue on the wrong page. I can include a fix for this in the same pull request as the linewidth parameter changes. It looks like a number of the functions that you'd added using getFromNamespace are now exported by scales or ggplot2 so there aren't too many that need to be copied over.

At least one of the non-exported functions uses cli so it would make sense to add that to Imports (and start using cli_abort() instead of the abort(glue(...)) combo in other functions as well).

elipousson commented 1 year ago

This is mostly fixed but I'll try to keep an eye on ggplot2 releases to see when datetime_scale() is officially exported so we can remove the last call to asNamespace(). Here is the relevant section: https://github.com/marcmenem/ggshadow/blob/master/R/ggplot2-utils.R#L563-L565

elipousson commented 1 year ago

Closed by #10