<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/remedy-is-now-on-cran/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://rtask.thinkr.fr/blog/remedy-is-now-on-cran/"> (en) The R Task Force</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><strong>After living for more than a year on GitHub, we are pleased to announce that the <code>{remedy}</code> package is now on CRAN. </strong></p>
<p><span></span></p>
<h2>A package for easier Markdown writing</h2>
<h3>About <code>{remedy}</code></h3>
<p><img sizes="(max-width: 260px) 100vw, 260px" src="https://i1.wp.com/rtask.thinkr.fr/wp-content/uploads/thinkr-hex-remedy-260x300.png?resize=260%2C300&ssl=1" alt="" width="260" class="wp-image-785" data-recalc-dims="1" height="300">Have you ever been frustrated about having to manually add markdown tags to your Rmd? If you are an avid markdown user, no doubt you’ve been complaining about what should be an easy task: adding bold, creating lists, urls, italics…</p>
<p>Good news, we’ve got the cure! <code>{remedy}</code> is a package designed to facilitate writing markdown documents in RStudio. The idea is to provide a series of keyboard shortcuts that will make you more efficient with markdown.</p>
<p>In other words, this package brings to markdown a “word processor like” experience when it comes to formatting — that is to say that putting things in bold is now possible via a keyboard shortcut.</p>
<p>Here is a quick example:</p>
<p><img alt="" src="https://i1.wp.com/github.com/ThinkR-open/remedy/raw/master/readme_gif/remedy_example.gif?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Available shorcuts</h3>
<p>Here is a list of available shortcuts:</p>
<ul>
<li><code>align_arrow</code> / <code>align_equal</code> align the assignment operators in the highlighted text. </li>
<li><code>backtickr</code> takes a piece of text an put it between backticks.</li>
<li><code>boldr</code> / <code>italicsr</code> / <code>striker</code> put a piece of text in bold, italics, or strike. </li>
<li><code>chunkr</code> / <code>chunknamer</code> / <code>chunkr_doc</code> / <code>chunkr_section</code> / <code>chunksplitr</code>, addins to deal with chunks.</li>
<li><code>footnoter</code> creates a footnote.</li>
<li><code>h1r</code>:<code>h6r</code> set selected text to headers (from H1 to H6). </li>
<li><code>htmlcommentr</code> add comment tags.</li>
<li><code>imager</code> / <code>urlr</code> / <code>youtuber</code> take an url and set the appropriate html/markdown tags. </li>
<li><code>latexr</code> add LaTeX tags.</li>
<li><code>listr</code> / <code>olistr</code> turn a series of lines into lists.</li>
<li><code>rightr</code> copies selected content to the right. </li>
<li><code>tabler</code> generates a markdown table.</li>
<li><code>xaringanr</code> inserts a pull-left pull-right for <code>{xaringan}</code>.</li>
</ul>
<h2>Setting up</h2>
<h3> Installing</h3>
<p>You can install <code>{remedy}</code> from the CRAN or from GitHub:</p>
<pre><code># From CRAN
install.packages(&quot;remedy&quot;)
# From GitHub
remotes::install_github(&quot;ThinkR-open/remedy&quot;)
</code></pre>
<p>Note that once installed, you don’t need to launch the package to use the shortcuts.</p>
<h3>Keyboard shortcuts</h3>
<p>Of course, the idea is not to select the text, go to your addins list, search for the good addin, and to do perform the transformation: you need to bind the content of <code>{remedy}</code> to keyboard shortcuts.</p>
<p>If ever you want to do that, you can do this manually through Tools > Modify Keyboard Shortcuts.</p>
<p><img sizes="(max-width: 1024px) 100vw, 1024px" src="https://i1.wp.com/rtask.thinkr.fr/wp-content/uploads/keyboard-shortcuts-rstudio-1024x354.png?w=450&ssl=1" alt="" class="wp-image-776" data-recalc-dims="1"></p>
<p>You can also use the <a rel="nofollow" href="https://github.com/yonicd/rsam" target="_blank"><code>{rsam}</code></a> package — either with the recommended shortcuts:</p>
<pre><code>remedy::remedy_opts$get('hotkeys')
#>           backtick               bold              chunk 
#>       &quot;Ctrl+Cmd+`&quot;       &quot;Ctrl+Cmd+B&quot;   &quot;Ctrl+Alt+Cmd+C&quot; 
#>         chunksplit          chunkname           footnote 
#> &quot;Ctrl+Shift+Alt+C&quot; &quot;Ctrl+Shift+Alt+N&quot; &quot;Ctrl+Cmd+Shift+6&quot; 
#>                 h1                 h2                 h3 
#>       &quot;Ctrl+Cmd+1&quot;       &quot;Ctrl+Cmd+2&quot;       &quot;Ctrl+Cmd+3&quot; 
#>                 h4                 h5                 h6 
#>       &quot;Ctrl+Cmd+4&quot;       &quot;Ctrl+Cmd+5&quot;       &quot;Ctrl+Cmd+6&quot; 
#>        htmlcomment              image            italics 
#>       &quot;Ctrl+Alt+C&quot;       &quot;Ctrl+Cmd+P&quot;       &quot;Ctrl+Cmd+I&quot; 
#>              latex               list              right 
#>       &quot;Ctrl+Cmd+L&quot; &quot;Ctrl+Shift+Cmd+=&quot;    &quot;Alt+Cmd+Right&quot; 
#>             strike              table                url 
#>       &quot;Ctrl+Cmd+S&quot;       &quot;Ctrl+Cmd+T&quot;       &quot;Ctrl+Cmd+U&quot; 
#>           xaringan            youtube 
#>       &quot;Ctrl+Cmd+X&quot;       &quot;Ctrl+Cmd+Y&quot;

hotkeys &lt;- remedy::remedy_opts$get(&quot;hotkeys&quot;)
rsam::set_shortcut(sprintf('remedy::%sr',names(hotkeys)), hotkeys)
</code></pre>
<p>or with your own shortcuts.</p>
<h2>Feedback and enhancement</h2>
<p>You’ve found a bug, or have an enhancement idea? Feel free to open an<br>
issue : <a rel="nofollow" href="https://github.com/ThinkR-open/remedy/issues" target="_blank">https://github.com/ThinkR-open/remedy/issues</a>.</p>
<p>The post <a rel="nofollow" href="https://rtask.thinkr.fr/blog/remedy-is-now-on-cran/" target="_blank">{remedy} is now on CRAN</a> appeared first on <a rel="nofollow" href="https://rtask.thinkr.fr/" target="_blank">(en) The R Task Force</a>.</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="https://rtask.thinkr.fr/blog/remedy-is-now-on-cran/"> (en) The R Task Force</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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/v5YHFf9Ss_I" height="1"></a></div>