ggplot2 - Why is GGally::ggpairs significantly slower in RStudio vs. base R? -
per title, know why rendering ggpairs
plot ggally
package takes longer in rstudio vs. base r (or terminal)?
example:
start.time <- sys.time() ggpairs(mtcars) end.time <- sys.time() time.taken <- end.time - start.time time.taken
running in rstudio on machine takes on order of 5 times longer base r. have experienced same slow down regardless of os (windows vs. mac).
are there workarounds?
other packages?
specifically, how render like: ggally::ggpairs(iris, color = "species")
without leaving rstudio?
i had similar issues, , spent time trying figure out why. found 4 significant issues (not exhaustive list). if situation mine, 1 , 2 main concerns.
- the ide. rstudio performs ggpairs slower r.
- your computing environment. don't have resources test extensively, we're talking gpu, since graphics processing issue.
- number of variables. more variables = exponential growth in time.
- sequential operations. if working on low-power machine, slow execution many requests.
you can read more on github here: https://github.com/zstachniak/elapsed-time-pairwise-functions/blob/master/ggpairs.md
Comments
Post a Comment