fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#roxygen2

0 posts0 participants0 posts today
James Balamuta<p>Dear <a href="https://mastodon.social/tags/rstats" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rstats</span></a> friends, remember all those tempdir()/tempfile() gymnastics for CRAN compliance?</p><p>examplesTempdir just made that circus act a one-liner with a simple <a href="https://mastodon.social/tags/roxygen2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>roxygen2</span></a> tag extension. Your future self will thank you.</p><p>💻 Code: <a href="https://github.com/coatless-rpkg/rocleteer" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/coatless-rpkg/rocle</span><span class="invisible">teer</span></a></p><p>📝 Post: <a href="https://blog.thecoatlessprofessor.com/programming/r/simplifying-file-based-examples-with-atexamplestempdir-in-r-packages/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.thecoatlessprofessor.com/</span><span class="invisible">programming/r/simplifying-file-based-examples-with-atexamplestempdir-in-r-packages/</span></a></p>
Zhian N. Kamvar<p>TIL you can include multiple `#' @examples` and `#' @examplesIf` statements in your <a href="https://hachyderm.io/tags/roxygen2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>roxygen2</span></a> <a href="https://hachyderm.io/tags/RStats" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RStats</span></a> code for conditional examples based on the user's system state.</p><p>I had previously thought that you could only use `#' @examples` OR `#' @examplesIf`, but never both. This is fantastic news!</p><p><a href="https://github.com/cran/report/blob/ee8409bb541f7289154b16ca724ed2a3923eb660/R/report_info.R#L13-L34" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/cran/report/blob/ee</span><span class="invisible">8409bb541f7289154b16ca724ed2a3923eb660/R/report_info.R#L13-L34</span></a></p>
Dr. Robert M Flight<p>That was new. Mistakenly put a new function definition below an <a href="https://mastodon.social/tags/RStats" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RStats</span></a> <a href="https://mastodon.social/tags/ROxygen2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ROxygen2</span></a> stub for exporting a method, and my NAMESPACE got very, very weird with stuff from the function description.</p><p>But faults on me for not looking at the NAMESPACE changes before committing and pushing the result. </p><p>Thankfully simple to fix. Move the function definition, delete the borked NAMESPACE, and {devtools::document()} to refresh it. Examine it, commit, push.</p>
devSJR :python: :rstats:<p><span class="h-card" translate="no"><a href="https://mastodon.social/@beps" class="u-url mention">@<span>beps</span></a></span> I truly understand what you mean. I am now talking a little about <a href="https://fosstodon.org/tags/RKWard" class="mention hashtag" rel="tag">#<span>RKWard</span></a>. We have a solid integration of <a href="https://fosstodon.org/tags/git" class="mention hashtag" rel="tag">#<span>git</span></a>, <a href="https://fosstodon.org/tags/rio" class="mention hashtag" rel="tag">#<span>rio</span></a> and some other tools. <a href="https://fosstodon.org/tags/quarto" class="mention hashtag" rel="tag">#<span>quarto</span></a> works. A tight integration of <a href="https://fosstodon.org/tags/styler" class="mention hashtag" rel="tag">#<span>styler</span></a> would be nice. We have a good R console and a terminal. Likewise, we don&#39;t have the deep integration of <a href="https://fosstodon.org/tags/devtools" class="mention hashtag" rel="tag">#<span>devtools</span></a>, <a href="https://fosstodon.org/tags/roxygen2" class="mention hashtag" rel="tag">#<span>roxygen2</span></a> and <a href="https://fosstodon.org/tags/pkgdown" class="mention hashtag" rel="tag">#<span>pkgdown</span></a>. Some find it good (I) others find it a hindrance.<br />In the end, there are many good choices.</p><p><a href="https://fosstodon.org/tags/rstats" class="mention hashtag" rel="tag">#<span>rstats</span></a></p>
Sharon Machlis<p>The {document} <a href="https://masto.machlis.com/tags/rstats" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rstats</span></a> 📦 creates roxygen2-style documentation for functions that aren't (yet) part of an R package.</p><p>In the screenshot below, top left shows a test.R file with a function called test_function , including roxygen definitions. After running </p><p>d &lt;- document("test.R")</p><p>I can use</p><p>?test_function</p><p>to read the help file as if it were part of a package.</p><p>By Andreas Dominik Cullmann</p><p><a href="https://cran.r-project.org/web/packages/document/vignettes/Introduction_to_document.html" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">cran.r-project.org/web/package</span><span class="invisible">s/document/vignettes/Introduction_to_document.html</span></a></p><p><span class="h-card"><a href="https://a.gup.pe/u/rstats" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>rstats</span></a></span> <br><a href="https://masto.machlis.com/tags/roxygen" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>roxygen</span></a> <a href="https://masto.machlis.com/tags/roxygen2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>roxygen2</span></a></p>