Skip to content

Commit

Permalink
llrs published a site update
Browse files Browse the repository at this point in the history
  • Loading branch information
hturner committed Jul 25, 2024
1 parent 62f0b5a commit 7ef1489
Show file tree
Hide file tree
Showing 23 changed files with 38 additions and 31 deletions.
4 changes: 2 additions & 2 deletions 06-finding_the_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This chapter discusses how you can have an overview of the R codebase. For insta

* Top-level function is an S3 generic, identified by a call to `UseMethod()`. Use `methods(function_name)` to see available methods, then go to step 2.

* Code of interest is in compiled code, identified by a call to `.C()`, `.Call()`, `.Fortran()`, and `.External()`, or `.Internal()` and `.Primitive()`: go to section on compiled code.
* Code of interest is in compiled code, identified by a call to `.C()`, `.Call()`, `.Fortran()`, `.External()`, and `.External.graphics()`, or `.Internal()` and `.Primitive()`: go to section on compiled code.

2. Nested functions or S3 methods may not be exported by the package they are in. If this is the case, the simplest way to view the code is to use `getAnywhere()` or `getS3method()`. Now you can keep looking at nested R functions till you find the code of interest or hit a call to compiled code.

Expand Down Expand Up @@ -54,7 +54,7 @@ Note: The above procedure does not cover S4, R6 or RC generics or methods. Refer
stats:::C_compcases$name
```

We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply "compcases" and in fact that is the general convention in R code, that you simply remove the `C_` prefix (sometimes `.F_` for Fortran code) in the name of the object passed to the first argument of the call.
We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply "compcases" and in fact that is the general convention in R code, that you simply remove the `C_` prefix (sometimes `.F_` for Fortran code^[Other variations are also possible. For example, `.External.graphics()` calls to C functions in the grid package have a `C_` prefix in the R code, but an `L_` prefix in the C code.]) in the name of the object passed to the first argument of the call.

2. Once you have the entry point, search as for R code. In the case of searching on GitHub, restrict the search to files with the relevant extension

Expand Down
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion CoreDev.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
3 changes: 2 additions & 1 deletion DevTools.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -363,6 +363,7 @@ <h2><span class="header-section-number">14.4</span> GitHub<a href="DevTools.html




</section>

</div>
Expand Down
2 changes: 1 addition & 1 deletion Doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
12 changes: 9 additions & 3 deletions FindSource.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -330,7 +330,7 @@ <h2><span class="header-section-number">6.1</span> Finding R source code<a href=
<li><p>Can already see code of interest: stop here or skip to step 3 to find the corresponding file in the R sources.</p></li>
<li><p>Code of interest is in nested R function: go to step 2.</p></li>
<li><p>Top-level function is an S3 generic, identified by a call to <code>UseMethod()</code>. Use <code>methods(function_name)</code> to see available methods, then go to step 2.</p></li>
<li><p>Code of interest is in compiled code, identified by a call to <code>.C()</code>, <code>.Call()</code>, <code>.Fortran()</code>, and <code>.External()</code>, or <code>.Internal()</code> and <code>.Primitive()</code>: go to section on compiled code.</p></li>
<li><p>Code of interest is in compiled code, identified by a call to <code>.C()</code>, <code>.Call()</code>, <code>.Fortran()</code>, <code>.External()</code>, and <code>.External.graphics()</code>, or <code>.Internal()</code> and <code>.Primitive()</code>: go to section on compiled code.</p></li>
</ul>
<ol start="2" style="list-style-type: decimal">
<li><p>Nested functions or S3 methods may not be exported by the package they are in. If this is the case, the simplest way to view the code is to use <code>getAnywhere()</code> or <code>getS3method()</code>. Now you can keep looking at nested R functions till you find the code of interest or hit a call to compiled code.</p></li>
Expand Down Expand Up @@ -358,7 +358,7 @@ <h2><span class="header-section-number">6.2</span> Finding C source code<a href=
<pre><code>.External(C_compcases, ...)</code></pre>
<p><code>C_compcases</code> inherits from class “NativeSymbolInfo” and we can extract the name of the entry point via</p>
<pre><code>stats:::C_compcases$name</code></pre>
<p>We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply “compcases” and in fact that is the general convention in R code, that you simply remove the <code>C_</code> prefix (sometimes <code>.F_</code> for Fortran code) in the name of the object passed to the first argument of the call.</p>
<p>We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply “compcases” and in fact that is the general convention in R code, that you simply remove the <code>C_</code> prefix (sometimes <code>.F_</code> for Fortran code<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a>) in the name of the object passed to the first argument of the call.</p>
<ol start="2" style="list-style-type: decimal">
<li>Once you have the entry point, search as for R code. In the case of searching on GitHub, restrict the search to files with the relevant extension</li>
</ol>
Expand All @@ -379,6 +379,12 @@ <h2><span class="header-section-number">6.3</span> See also<a href="FindSource.h
<p><a href="https://blog.r-hub.io/2019/05/14/read-the-source/">Read the R source</a> blogpost.</p>

</div>
</div>
<div class="footnotes">
<hr />
<ol start="5">
<li id="fn5"><p>Other variations are also possible. For example, <code>.External.graphics()</code> calls to C functions in the grid package have a <code>C_</code> prefix in the R code, but an <code>L_</code> prefix in the C code.<a href="FindSource.html#fnref5" class="footnote-back">↩︎</a></p></li>
</ol>
</div>
</section>

Expand Down
2 changes: 1 addition & 1 deletion FixBug.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion GetStart.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion IssueTrack.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion News.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion ReportingBugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion ReviewBugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion TestRVer.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion WhereToGetHelp.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion acknowledgement.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -321,7 +321,7 @@ <h1>
<div id="header">
<h1 class="title">R Development Guide</h1>
<p class="author"><em>R Contribution Working Group</em></p>
<p class="date"><em>2024-07-23</em></p>
<p class="date"><em>2024-07-25</em></p>
</div>
<div id="section" class="section level1 unnumbered">
<h1 class="unnumbered"></h1>
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "R Development Guide"
author: "R Contribution Working Group"
date: "2024-07-23"
date: "2024-07-25"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
Expand Down
2 changes: 1 addition & 1 deletion introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
10 changes: 5 additions & 5 deletions message-translations.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="R Contribution Working Group" />


<meta name="date" content="2024-07-23" />
<meta name="date" content="2024-07-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -428,7 +428,7 @@ <h4><span class="header-section-number">9.1.2.2</span> Plural messages<a href="m
different ways to pluralize a quantity.</p>
<p>In <code>.po</code> files, this shows up in the form of <code>msgid_plural</code> entries,
followed by several ordered <code>msgstr</code> entries. Here’s an example from
<a href="https://github.com/r-devel/r-svn/blob/c715d61cb74b3fee2d035faed9b258e86e420b75/src/library/base/po/R-de.po#L2015-L2018"><code>R-de.po</code></a><a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a>:</p>
<a href="https://github.com/r-devel/r-svn/blob/c715d61cb74b3fee2d035faed9b258e86e420b75/src/library/base/po/R-de.po#L2015-L2018"><code>R-de.po</code></a><a href="#fn6" class="footnote-ref" id="fnref6"><sup>6</sup></a>:</p>
<pre><code>msgid &quot;Warning message:\n&quot;
msgid_plural &quot;Warning messages:\n&quot;
msgstr[0] &quot;Warnmeldung:\n&quot;
Expand Down Expand Up @@ -587,10 +587,10 @@ <h2><span class="header-section-number">9.4</span> Helpful references<a href="me
</div>
<div class="footnotes">
<hr />
<ol start="5">
<li id="fn5"><p>The GitHub mirror of the <a href="https://svn.r-project.org/R/trunk/">actual svn
<ol start="6">
<li id="fn6"><p>The GitHub mirror of the <a href="https://svn.r-project.org/R/trunk/">actual svn
repo</a> is linked in this chapter
as it is a better interface for browsing the source files.<a href="message-translations.html#fnref5" class="footnote-back">↩︎</a></p></li>
as it is a better interface for browsing the source files.<a href="message-translations.html#fnref6" class="footnote-back">↩︎</a></p></li>
</ol>
</div>
</section>
Expand Down
Binary file modified rdevguide.epub
Binary file not shown.
Binary file modified rdevguide.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions rdevguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

\title{R Development Guide}
\author{R Contribution Working Group}
\date{2024-07-23}
\date{2024-07-25}

\begin{document}
\maketitle
Expand Down Expand Up @@ -978,7 +978,7 @@ \section{Finding R source code}\label{finding-r-source-code}
\item
Top-level function is an S3 generic, identified by a call to \texttt{UseMethod()}. Use \texttt{methods(function\_name)} to see available methods, then go to step 2.
\item
Code of interest is in compiled code, identified by a call to \texttt{.C()}, \texttt{.Call()}, \texttt{.Fortran()}, and \texttt{.External()}, or \texttt{.Internal()} and \texttt{.Primitive()}: go to section on compiled code.
Code of interest is in compiled code, identified by a call to \texttt{.C()}, \texttt{.Call()}, \texttt{.Fortran()}, \texttt{.External()}, and \texttt{.External.graphics()}, or \texttt{.Internal()} and \texttt{.Primitive()}: go to section on compiled code.
\end{itemize}
\begin{enumerate}
Expand Down Expand Up @@ -1039,7 +1039,7 @@ \section{Finding C source code}\label{finding-c-source-code}
stats:::C_compcases$name
\end{verbatim}
We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply ``compcases'' and in fact that is the general convention in R code, that you simply remove the \texttt{C\_} prefix (sometimes \texttt{.F\_} for Fortran code) in the name of the object passed to the first argument of the call.
We know that it is in the stats package as we see that when we print complete.cases or look at the help file. This shows us that the entry point is simply ``compcases'' and in fact that is the general convention in R code, that you simply remove the \texttt{C\_} prefix (sometimes \texttt{.F\_} for Fortran code\footnote{Other variations are also possible. For example, \texttt{.External.graphics()} calls to C functions in the grid package have a \texttt{C\_} prefix in the R code, but an \texttt{L\_} prefix in the C code.}) in the name of the object passed to the first argument of the call.
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
Expand Down
2 changes: 1 addition & 1 deletion search_index.json

Large diffs are not rendered by default.

0 comments on commit 7ef1489

Please sign in to comment.