<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/ggedit-0-2-0-is-now-on-cran/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r-posts.com/ggedit-0-2-0-is-now-on-cran/"> R-posts.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a target="_blank" rel="nofollow" href="https://github.com/yonicd/">Jonathan Sidi</a>, <a target="_blank" rel="nofollow" href="http://metrumrg.com/opensourcetools.html">Metrum Research Group</a></p>
<p><img alt="ggedit" src="https://i0.wp.com/raw.githubusercontent.com/metrumresearchgroup/ggedit/master/Miscellaneous/BlogPosts/Four/introPic1.png?w=660&ssl=1" data-recalc-dims="1"></p>
<p>We are pleased to announce the release of the ggedit package on <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/ggedit/index.html">CRAN</a>.</p>
<p>To install the package you can call the standard R command</p>
<pre><code>install.packages('ggedit')</code></pre>
<p>The source version is still tracked on <a target="_blank" rel="nofollow" href="https://github.com/metrumresearchgroup/ggedit">github</a>, which has been reorganized to be easier to navigate.</p>
<p>To install the dev version:</p>
<pre><code>devtools::install_github('metrumresearchgroup/ggedit')</code></pre>
<div>
<h3>What is ggedit?</h3>
<p>ggedit is an R package that is used to facilitate ggplot formatting. With ggedit, R users of all experience levels can easily move from creating ggplots to refining aesthetic details, all while maintaining portability for further reproducible research and collaboration.<br>
ggedit is run from an R console or as a reactive object in any Shiny application. The user inputs a ggplot object or a list of objects. The application populates Bootstrap modals with all of the elements found in each layer, scale, and theme of the ggplot objects. The user can then edit these elements and interact with the plot as changes occur. During editing, a comparison of the script is logged, which can be directly copied and shared. The application output is a nested list containing the edited layers, scales, and themes in both object and script form, so you can apply the edited objects independent of the original plot using regular ggplot2 grammar.<br>
Why does it matter? ggedit promotes efficient collaboration. You can share your plots with team members to make formatting changes, and they can then send any objects they’ve edited back to you for implementation. No more email chains to change a circle to a triangle!
</p>
</div>
<div>
<h3>Updates in ggedit 0.2.0:</h3>
<ul>
<li>The layer modal (popups) elements have been reorganized for less clutter and easier navigation.</li>
<li>The S3 method written to plot and compare themes has been removed from the package, but can still be found on the repo, see <a target="_blank" rel="nofollow" href="https://github.com/metrumresearchgroup/ggedit/blob/master/Miscellaneous/Utilities/plot.theme.R">plot.theme</a>.</li>
</ul>
</div>
<div>
<h3>Deploying</h3>
<ul>
<li>call from the console: <code>ggedit(p)</code></li>
<li>call from the addin toolbar: highlight script of a plot object on the source editor window of RStudio and run from toolbar.</li>
<li>call as part of Shiny: use the Shiny module syntax to call the ggEdit UI elements.
<ul>
<li>server: <code>callModule(ggEdit,'pUI',obj=reactive(p))</code></li>
<li>ui: <code>ggEditUI('pUI')</code></li>
</ul>
</li>
<li>if you have installed the package you can see an example of a Shiny app by executing <code>runApp(system.file('examples/shinyModule.R',package = 'ggedit'))</code></li>
</ul>
</div>
<div>
<h3>Outputs</h3>
<p>ggedit returns a list containing 8 elements either to the global enviroment or as a reactive output in Shiny.</p>
<ul>
<li>updatedPlots
<ul>
<li>List containing updated ggplot objects</li>
</ul>
</li>
<li>updatedLayers
<ul>
<li>For each plot a list of updated layers (ggproto) objects</li>
<li>Portable object</li>
</ul>
</li>
<li>updatedLayersElements
<ul>
<li>For each plot a list elements and their values in each layer</li>
<li>Can be used to update the new values in the original code</li>
</ul>
</li>
<li>updatedLayerCalls
<ul>
<li>For each plot a list of scripts that can be run directly from the console to create a layer</li>
</ul>
</li>
<li>updatedThemes
<ul>
<li>For each plot a list of updated theme objects</li>
<li>Portable object</li>
<li>If the user doesn’t edit the theme updatedThemes will not be returned</li>
</ul>
</li>
<li>updatedThemeCalls
<ul>
<li>For each plot a list of scripts that can be run directly from the console to create a theme</li>
</ul>
</li>
<li>updatedScales
<ul>
<li>For each plot a list of updated scales (ggproto) objects</li>
<li>Portable object</li>
</ul>
</li>
<li>updatedScaleCalls
<ul>
<li>For each plot a list of scripts that can be run directly from the console to create a scale</li>
</ul>
</li>
</ul>
</div>
<div> </div>
<h3>Short Clip to use ggedit in Shiny</h3>
<p><a target="_blank" rel="nofollow" href="https://www.youtube.com/embed/pJ1kbd_OVwg"><img src="https://i2.wp.com/img.youtube.com/vi/pJ1kbd_OVwg/0.jpg?resize=400%2C225" data-recalc-dims="1"></a></p>
<hr>
<p><em> Jonathan Sidi joined Metrum Research Group in 2016 after working for several years on problems in applied statistics, financial stress testing and economic forecasting in both industrial and academic settings. To learn more about additional open-source software packages developed by Metrum Research Group please visit the Metrum <a target="_blank" rel="nofollow" href="http://metrumrg.com/opensourcetools.html">website</a>. Contact: For questions and comments, feel free to email me at: yonis@metrumrg.com or open an issue for bug fixes or enhancements at <a target="_blank" rel="nofollow" href="https://github.com/metrumresearchgroup/ggedit/issues">github</a>. </em></p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://r-posts.com/ggedit-0-2-0-is-now-on-cran/"> R-posts.com</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/s0ndY4CheAs"></a></div>