<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/rcppgetconf-0-0-1/"></div></div><div><a data-url="http://www.r-bloggers.com/rcppgetconf-0-0-1/" data-counturl="http://www.r-bloggers.com/rcppgetconf-0-0-1/" data-count="horizontal" data-text="RcppGetconf 0.0.1" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://dirk.eddelbuettel.com/blog/2016/07/28#rcppgetconf_0.0.1"> Thinking inside the box </a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A new package <a target="_blank" href="http://dirk.eddelbuettel.com/code/rcpp.getconf.html">RcppGetconf</a> to read system configuration — not unlike <code>getconf</code> from the libc library. Now R can read what system calls <code>sysconf</code>, <code>pathconf</code> and <code>confstr</code> have to say. The package is still pretty green, and now on <a target="_blank" href="http://cran.r-project.org/">CRAN</a> in a very first version, corresponding to a very first (and single !) commit.</p>
<p>Right now, the <a target="_blank" href="http://cran.r-project.org/">CRAN</a> just has one function <code>getAll()</code> similar to <code>getconf -a</code>. A first example shows how it provides all values which can be retried — currently 320 on my systems.</p>
<div>
<pre><code>R><span> </span>res &lt;-<span> </span><span>getAll</span>()
R><span> </span><span>head</span>(res)
               key value type
<span>1</span>         LINK_MAX <span>65000</span> path
<span>2</span>  _POSIX_LINK_MAX <span>65000</span> path
<span>3</span>        MAX_CANON   <span>255</span> path
<span>4</span> _POSIX_MAX_CANON   <span>255</span> path
<span>5</span>        MAX_INPUT   <span>255</span> path
<span>6</span> _POSIX_MAX_INPUT   <span>255</span> path
R><span> </span><span>tail</span>(res)
                      key  value type
<span>315</span>    LEVEL4_CACHE_ASSOC      <span>0</span>  sys
<span>316</span> LEVEL4_CACHE_LINESIZE      <span>0</span>  sys
<span>317</span>                  IPV6 <span>200809</span>  sys
<span>318</span>           RAW_SOCKETS <span>200809</span>  sys
<span>319</span>           _POSIX_IPV6 <span>200809</span>  sys
<span>320</span>    _POSIX_RAW_SOCKETS <span>200809</span>  sys
R><span> </span></code></pre>
</div>
<p>Earlier this evening I added a second function to the <a target="_blank" href="https://github.com/eddelbuettel/rcppgetconf">GitHub repo</a> which can access indivial values.</p>
<p>But right now, the biggest need is really for someone with some systems skills—and an OS X machine—to look at the code, and maybe the <code>getconf.c</code> from the C library, in order to make this build OS X. If <em>you</em> can help, please get in touch.</p>
<p>More about the package is at the <a target="_blank" href="http://dirk.eddelbuettel.com/code/rcpp.getconf.html">local RcppGetconf page</a> and the <a target="_blank" href="https://github.com/eddelbuettel/rcppgetconf">GitHub repo</a>.</p>
<p>
This post by <a target="_blank" href="http://dirk.eddelbuettel.com/">Dirk Eddelbuettel</a> originated on his <a target="_blank" href="http://dirk.eddelbuettel.com/blog/">Thinking inside the box</a> blog. Please report excessive re-aggregation in third-party for-profit settings.</p>
<p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/rcppgetconf-0-0-1/"></div></div><div><a data-url="http://www.r-bloggers.com/rcppgetconf-0-0-1/" data-counturl="http://www.r-bloggers.com/rcppgetconf-0-0-1/" data-count="vertical" data-text="RcppGetconf 0.0.1" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://dirk.eddelbuettel.com/blog/2016/07/28#rcppgetconf_0.0.1"> Thinking inside the box </a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://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="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/5Xpec2nFYYo"></a></div>