<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/8-customizing-spell-checks-for-r-cmd-check/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://dirk.eddelbuettel.com/blog/2017/08/10#008_aspell_cran_incoming"> Thinking inside the box </a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Welcome to the eight post in the <em>ramblingly random R rants</em> series, or <span><em>R</em><sup>4</sup></span> for short. We took a short break over the last few weeks due to some <a rel="nofollow" href="http://dirk.eddelbuettel.com/blog/2017/05/16#rcpp_talks_summer_2017" target="_blank">conferencing</a> followed by some <a rel="nofollow" href="https://twitter.com/eddelbuettel/status/890659151654801408" target="_blank">vacationing</a> and general chill.</p>
<p>But we’re back now, and this post gets us back to initial spirit of (hopefully) quick and useful posts. Perusing yesterday’s <a rel="nofollow" href="http://dirk.eddelbuettel.com/cranberries/2017/08/09/" target="_blank">batch of CRANberries</a> posts, I noticed a peculiar new directory shown the in the <a rel="nofollow" href="http://invisible-island.net/diffstat/" target="_blank">diffstat</a> output we use to compare two subsequent source tarballs. It was entitled <code>.aspell/</code>, in the top-level directory, and in two new packages by R Core member <a rel="nofollow" href="https://www.wu.ac.at/en/statmath/faculty-staff/faculty/khornik/" target="_blank">Kurt Hornik</a> himself.</p>
<p>The context is, of course, the not infrequently-expressed desire to customize the spell checking done on CRAN incoming packages, see e.g. this <a rel="nofollow" href="https://stat.ethz.ch/pipermail/r-package-devel/2016q1/000714.html" target="_blank">r-package-devel thread</a>.</p>
<p>And now we can as I verified with (the upcoming next release of) RcppArmadillo, along with a recent-enough (i.e. last few days) version of r-devel. Just copying what Kurt did, i.e. adding a file <code>.aspell/defaults.R</code>, and in it pointing to rds file (named as the package) containing a character vector with words added to the spell checker’s universe is all it takes. For my package, see <a rel="nofollow" href="https://github.com/RcppCore/RcppArmadillo/tree/master/.aspell" target="_blank">here</a> for the peculiars.</p>
<p>Or see here:</p>
<div>
<pre><code><span>edd@bud</span>:~/git/rcpparmadillo/.aspell(master)$ <span>cat</span> defaults.R 
<span>Rd_files</span> <span></span>- vignettes <span></span>- R_files <span></span>- description <span></span>-
    <span>list</span>(encoding = <span>&quot;UTF-8&quot;</span>,
         <span>language</span> = <span>&quot;en&quot;</span>,
         <span>dictionaries</span> = c(<span>&quot;en_stats&quot;</span>, <span>&quot;RcppArmadillo&quot;</span>))
<span>edd@bud</span>:~/git/rcpparmadillo/.aspell(master)$ <span>r</span> -p -e <span>'readRDS(&quot;RcppArmadillo.rds&quot;)'</span>
[<span>1</span>] <span>&quot;MPL&quot;</span>            <span>&quot;Sanderson&quot;</span>      <span>&quot;Templated&quot;</span>
[<span>4</span>] <span>&quot;decompositions&quot;</span> <span>&quot;onwards&quot;</span>        <span>&quot;templated&quot;</span>
<span>edd@bud</span>:~/git/rcpparmadillo/.aspell(master)$     </code></pre>
</div>
<p>And now <code>R(-devel) CMD check --as-cran ...</code> is silent about spelling. Yay!</p>
<p>But take this with a grain of salt as this does not yet seem to be &quot;announced&quot; as e.g. yesterday’s <a rel="nofollow" href="https://twitter.com/CRANPolicyWatch/status/895332631885225985" target="_blank">change in the CRAN Policy</a> did not mention it. So things may well change — but hey, it worked for me.</p>
<p>And this all is about <code>aspell</code>, here is something topical about <em>a spell</em> to close the post:</p>
<p><iframe width="450" allowfullscreen src="https://www.youtube.com/embed/PwXai-sgM-s"><br>
</iframe></p>
<p>
This post by <a rel="nofollow" href="http://dirk.eddelbuettel.com/" target="_blank">Dirk Eddelbuettel</a> originated on his <a rel="nofollow" href="http://dirk.eddelbuettel.com/blog/" target="_blank">Thinking inside the box</a> blog. Please report excessive re-aggregation in third-party for-profit settings.</p>
<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://dirk.eddelbuettel.com/blog/2017/08/10#008_aspell_cran_incoming"> Thinking inside the box </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/nfq0Y_CyBGc" height="1"></a></div>