stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.02k stars 264 forks source link

Why does RStan `import(ggplot2)`? #625

Open emonigma opened 5 years ago

emonigma commented 5 years ago

Summary:

RStan's NAMESPACE uses import(ggplot2). Why?

Description:

When I do library(rstan), I attach all of ggplot2's functions to the search path. In my view, this pollutes the search path.

I understand that import(ggplot2) saves on typing and avoid two symbol look-ups, and some advantages regarding generics (see thread).

Still, this seems like a small benefit to the developer with a large cost on the user, who may need to debug name clashes and order of package import.

Why does RStan do import(ggplot2)?

Reproducible Steps:

Not relevant.

Current Output:

Not relevant.

Expected Output:

Not relevant.

RStan Version:

2.18.2

R Version:

R version 3.5.2 (2018-12-20)

Operating System:

OS X 10.14.4

bgoodri commented 5 years ago

It wasn't about saving keystrokes, but I can't remember why ggplot2 is in Depends. I think it had something to do with the theming.

ajay-d commented 5 years ago

All the traceplots are ggplot objects that you can further customize by just adding additional ggplot commands