Don't transform non-crossref links

This commit is contained in:
Hadley Wickham
2022-11-18 10:30:32 -06:00
parent 4caea5281b
commit 78a1c12fe7
32 changed files with 693 additions and 693 deletions

View File

@@ -12,14 +12,14 @@
<h1>
Google is your friend</h1>
<p>If you get stuck, start with Google. Typically adding “R” to a query is enough to restrict it to relevant results: if the search isnt useful, it often means that there arent any R-specific results available. Google is particularly useful for error messages. If you get an error message and you have no idea what it means, try googling it! Chances are that someone else has been confused by it in the past, and there will be help somewhere on the web. (If the error message isnt in English, run <code>Sys.setenv(LANGUAGE = "en")</code> and re-run the code; youre more likely to find help for English error messages.)</p>
<p>If Google doesnt help, try <a href="#chp-https://stackoverflow" data-type="xref">#chp-https://stackoverflow</a>. Start by spending a little time searching for an existing answer, including <code>[R]</code> to restrict your search to questions and answers that use R.</p>
<p>If Google doesnt help, try <a href="https://stackoverflow.com">Stack Overflow</a>. Start by spending a little time searching for an existing answer, including <code>[R]</code> to restrict your search to questions and answers that use R.</p>
</section>
<section id="making-a-reprex" data-type="sect1">
<h1>
Making a reprex</h1>
<p>If your googling doesnt find anything useful, its a really good idea prepare a <strong>reprex,</strong> short for minimal <strong>repr</strong>oducible <strong>ex</strong>ample. A good reprex makes it easier for other people to help you, and often youll figure out the problem yourself in the course of making it. There are two parts to creating a reprex:</p>
<ul><li><p>First, you need to make your code reproducible. This means that you need to capture everything, i.e., include any <code><a href="#chp-https://rdrr.io/r/base/library" data-type="xref">#chp-https://rdrr.io/r/base/library</a></code> calls and create all necessary objects. The easiest way to make sure youve done this is to use the reprex package.</p></li>
<ul><li><p>First, you need to make your code reproducible. This means that you need to capture everything, i.e., include any <code><a href="https://rdrr.io/r/base/library.html">library()</a></code> calls and create all necessary objects. The easiest way to make sure youve done this is to use the reprex package.</p></li>
<li><p>Second, you need to make it minimal. Strip away everything that is not directly related to your problem. This usually involves creating a much smaller and simpler R object than the one youre facing in real life or even using built-in data.</p></li>
</ul><p>That sounds like a lot of work! And it can be, but it has a great payoff:</p>
<ul><li><p>80% of the time creating an excellent reprex reveals the source of your problem. Its amazing how often the process of writing up a self-contained and minimal example allows you to answer your own question.</p></li>
@@ -47,7 +47,7 @@ mean(y)
<p>There are three things you need to include to make your example reproducible: required packages, data, and code.</p>
<ol type="1"><li><p><strong>Packages</strong> should be loaded at the top of the script, so its easy to see which ones the example needs. This is a good time to check that youre using the latest version of each package; its possible youve discovered a bug thats been fixed since you installed or last updated the package. For packages in the tidyverse, the easiest way to check is to run <code>tidyverse_update()</code>.</p></li>
<li>
<p>The easiest way to include <strong>data</strong> is to use <code><a href="#chp-https://rdrr.io/r/base/dput" data-type="xref">#chp-https://rdrr.io/r/base/dput</a></code> to generate the R code needed to recreate it. For example, to recreate the <code>mtcars</code> dataset in R, perform the following steps:</p>
<p>The easiest way to include <strong>data</strong> is to use <code><a href="https://rdrr.io/r/base/dput.html">dput()</a></code> to generate the R code needed to recreate it. For example, to recreate the <code>mtcars</code> dataset in R, perform the following steps:</p>
<ol type="1"><li>Run <code>dput(mtcars)</code> in R</li>
<li>Copy the output</li>
<li>In reprex, type <code>mtcars &lt;-</code> then paste.</li>
@@ -66,8 +66,8 @@ mean(y)
<section id="investing-in-yourself" data-type="sect1">
<h1>
Investing in yourself</h1>
<p>You should also spend some time preparing yourself to solve problems before they occur. Investing a little time in learning R each day will pay off handsomely in the long run. One way is to follow what the tidyverse team is doing on the <a href="#chp-https://www.tidyverse.org/blog/" data-type="xref">#chp-https://www.tidyverse.org/blog/</a>. To keep up with the R community more broadly, we recommend reading <a href="#chp-https://rweekly" data-type="xref">#chp-https://rweekly</a>: its a community effort to aggregate the most interesting news in the R community each week.</p>
<p>If youre an active Twitter user, you might also want to follow Hadley (<a href="#chp-https://twitter.com/hadleywickham" data-type="xref">#chp-https://twitter.com/hadleywickham</a>), Mine (<a href="#chp-https://twitter.com/minebocek" data-type="xref">#chp-https://twitter.com/minebocek</a>), Garrett (<a href="#chp-https://twitter.com/statgarrett" data-type="xref">#chp-https://twitter.com/statgarrett</a>), or follow <a href="#chp-https://twitter.com/rstudiotips" data-type="xref">#chp-https://twitter.com/rstudiotips</a> to keep up with new features in the IDE. If you want the full fire hose of new developments, you can also read the (<a href="#chp-https://twitter.com/search?q=%23rstats" data-type="xref">#chp-https://twitter.com/search?q=%23rstats</a>) hashtag. This is one the key tools that Hadley and Mine use to keep up with new developments in the community.</p>
<p>You should also spend some time preparing yourself to solve problems before they occur. Investing a little time in learning R each day will pay off handsomely in the long run. One way is to follow what the tidyverse team is doing on the <a href="https://www.tidyverse.org/blog/">tidyverse blog</a>. To keep up with the R community more broadly, we recommend reading <a href="https://rweekly.org">R Weekly</a>: its a community effort to aggregate the most interesting news in the R community each week.</p>
<p>If youre an active Twitter user, you might also want to follow Hadley (<a href="https://twitter.com/hadleywickham">@hadleywickham</a>), Mine (<a href="https://twitter.com/minebocek">@minebocek</a>), Garrett (<a href="https://twitter.com/statgarrett">@statgarrett</a>), or follow <a href="https://twitter.com/rstudiotips">@rstudiotips</a> to keep up with new features in the IDE. If you want the full fire hose of new developments, you can also read the (<a href="https://twitter.com/search?q=%23rstats"><code>#rstats</code></a>) hashtag. This is one the key tools that Hadley and Mine use to keep up with new developments in the community.</p>
</section>
<section id="summary" data-type="sect1">