USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

pkg.env not loaded causing match.arg error #470

Open lindsayplatt opened 7 years ago

lindsayplatt commented 7 years ago

If you use a gsplot function before the library is loaded, then pkg.env is not correct, which makes allowedTypes in config.R empty.

# unhelpful match.arg error
gsplot::gsplot()
Error in match.arg(type, choices = allowedTypes) : 
  'arg' should be one of

# more useful error about not know what gsplot is
gsplot::points(gsplot(), 1,2)
Error in override("graphics", "points", object, ...) : 
  could not find function "gsplot"

Should we throw a more helpful error?