<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: plumber:An R package that converts your existing R code to a web API]]></title>
	<link>https://bioinformaticsonline.com/bookmarks/view/39114/plumberan-r-package-that-converts-your-existing-r-code-to-a-web-api?</link>
	<atom:link href="https://bioinformaticsonline.com/bookmarks/view/39114/plumberan-r-package-that-converts-your-existing-r-code-to-a-web-api?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/39114/plumberan-r-package-that-converts-your-existing-r-code-to-a-web-api</guid>
	<pubDate>Wed, 13 Mar 2019 19:20:10 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/39114/plumberan-r-package-that-converts-your-existing-r-code-to-a-web-api</link>
	<title><![CDATA[plumber:An R package that converts your existing R code to a web API]]></title>
	<description><![CDATA[<p>plumber allows you to create a REST API by merely decorating your existing R source code with special comments. Take a look at an example.</p>
<pre><code><span># plumber.R
</span><span>
</span><span>#* Echo back the input
#* @param msg The message to echo
#* @get /echo
</span><span>function</span><span>(</span><span>msg</span><span>=</span><span>""</span><span>){</span><span>
  </span><span>list</span><span>(</span><span>msg</span><span> </span><span>=</span><span> </span><span>paste0</span><span>(</span><span>"The message is: '"</span><span>,</span><span> </span><span>msg</span><span>,</span><span> </span><span>"'"</span><span>))</span><span>
</span><span>}</span><span>

</span><span>#* Plot a histogram
#* @png
#* @get /plot
</span><span>function</span><span>(){</span><span>
  </span><span>rand</span><span> </span><span>&lt;-</span><span> </span><span>rnorm</span><span>(</span><span>100</span><span>)</span><span>
  </span><span>hist</span><span>(</span><span>rand</span><span>)</span><span>
</span><span>}</span><span>

</span><span>#* Return the sum of two numbers
#* @param a The first number to add
#* @param b The second number to add
#* @post /sum
</span><span>function</span><span>(</span><span>a</span><span>,</span><span> </span><span>b</span><span>){</span><span>
  </span><span>as.numeric</span><span>(</span><span>a</span><span>)</span><span> </span><span>+</span><span> </span><span>as.numeric</span><span>(</span><span>b</span><span>)</span><span>
</span><span>}</span></code></pre><p>Address of the bookmark: <a href="https://www.rplumber.io/" rel="nofollow">https://www.rplumber.io/</a></p>]]></description>
	<dc:creator>BioJoker</dc:creator>
</item>

</channel>
</rss>