You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>RStudio users can leverage git Version control to enhance reproducibility.</p>
2104
+
<p>RStudio users can leverage git Version control to enhance
2105
+
reproducibility.</p>
2105
2106
</div>
2106
2107
2107
2108
2108
2109
<divclass="d-article">
2109
-
<p>The <ahref="https://usethis.r-lib.org/"><code>usethis</code></a> package and the RStudio IDE will help you orchestrate your version control repositories as RStudio projects.</p>
<p>To get started, make a free GitHub.com account. Make sure you have the latest versions of R, RStudio, and usethis. Then, setup your RStudio configuration using two key documents: <ahref="https://usethis.r-lib.org/articles/articles/usethis-setup.html">Setup</a>, and <ahref="https://usethis.r-lib.org/articles/articles/git-credentials.html">Managing Git(Hub) Credentials</a>.</p>
2119
+
<p>To get started, make a free GitHub.com account. Make sure you have
2120
+
the latest versions of R, RStudio, and usethis. Then, setup your RStudio
<h4id="set-up-git-and-manage-github-credentials">set-up git and manage GitHub credentials</h4>
2158
+
<h4id="set-up-git-and-manage-github-credentials">set-up git and manage
2159
+
GitHub credentials</h4>
2149
2160
<divclass="layout-chunk" data-layout="l-body">
2150
2161
<divclass="sourceCode">
2151
2162
<preclass="sourceCode r"><codeclass="sourceCode r"><spanclass='co'># Sign-in to your GitHub account</span>
@@ -2161,8 +2172,14 @@ <h4 id="set-up-git-and-manage-github-credentials">set-up git and manage GitHub c
2161
2172
</div>
2162
2173
</div>
2163
2174
<h3id="next-level">Next Level…</h3>
2164
-
<p>Take your reproducibility to the next level. <ahref="https://guides.github.com/activities/citable-code/">Make your code citable</a> by connecting your GitHub repo and your <ahref="https://orcid.org/register">ORCID</a> (unique author ID) through to the <ahref="https://zenodo.org/">Zenodo</a> archival repository. Now, every time you commit a milestone release, you also mint a DOI.</p>
2165
-
<h4id="share-a-zero-install-compute-environment">Share a zero-install compute environment</h4>
2175
+
<p>Take your reproducibility to the next level. <a
2176
+
href="https://guides.github.com/activities/citable-code/">Make your code
2177
+
citable</a> by connecting your GitHub repo and your <a
2178
+
href="https://orcid.org/register">ORCID</a> (unique author ID) through
2179
+
to the <ahref="https://zenodo.org/">Zenodo</a> archival repository.
2180
+
Now, every time you commit a milestone release, you also mint a DOI.</p>
2181
+
<h4id="share-a-zero-install-compute-environment">Share a zero-install
2182
+
compute environment</h4>
2166
2183
<!-- Containerize your repository with binder.org using the [`holepunch` package](https://karthik.github.io/holepunch/) -->
2167
2184
<p>Publish your code in a binder.org container</p>
2168
2185
<!-- Use the [`holepunch` package](https://karthik.github.io/holepunch/) -->
@@ -2171,32 +2188,69 @@ <h4 id="share-a-zero-install-compute-environment">Share a zero-install compute e
2171
2188
</div>
2172
2189
<!-- #### Bespoke_Publish your code in a binder -->
2173
2190
<!-- I recently found my QuickPublish approach _didn't quite work_. So I RTFMed the binder.org docs and it seemed to imply a preference for NOT using a `.binder/Dockerfile`. Therefore, here is an approach that is slightly less automated but more bulletproof. -->
2174
-
<p>Everything you need is exemplified in binder-example for R that you can <ahref="https://github.com/binder-examples/r">find on github</a></p>
2175
-
<p>The key elements are an <code>install.R</code> and <code>runtime.txt</code> files. The content and format of each file is demonstrated properly at the GitHub repo. Browse and you will see.</p>
2191
+
<p>Everything you need is exemplified in binder-example for R that you
2192
+
can <ahref="https://github.com/binder-examples/r">find on
2193
+
github</a></p>
2194
+
<p>The key elements are an <code>install.R</code> and
2195
+
<code>runtime.txt</code> files. The content and format of each file is
2196
+
demonstrated properly at the GitHub repo. Browse and you will see.</p>
2176
2197
<p><strong>Step 1</strong></p>
2177
2198
<divclass="layout-chunk" data-layout="l-body">
2178
2199
2179
2200
</div>
2180
2201
<oltype="a">
2181
-
<li>Create an <code>install.R</code> file and store it in the RStudio Project’s root directory.<br> Follow the example at <ahref="https://github.com/binder-examples/r" class="uri">https://github.com/binder-examples/r</a><br></li>
2202
+
<li>Create an <code>install.R</code> file and store it in the RStudio
2203
+
Project’s root directory.<br> Follow the example at <a
<p>This file should consist of install functions for each package used in your R code. If you’re not sure what packages you’re using, try running <code>holepunch::write_compendium_description()</code> and you will find the details listed in the DESCRIPTION file under the ‘Depends’ and ‘Remotes’ sections. <strong>IMPORTANT</strong>: Delete the <code>DESCRIPTION</code> file Before launching the binder build. In my experience the DESCRIPTION file will conflict with the binder’s build process. <br> For non-CRAN packages – specifically packages installed from GitHub – I recommend using the format: <code>remotes::install_github("gadenbuie/countdown")</code> for each package that is not on CRAN. CRAN packages can follow the format: <code>install.packages("dplyr")</code></p>
2208
+
<p>This file should consist of install functions for each package used
2209
+
in your R code. If you’re not sure what packages you’re using, try
2210
+
running <code>holepunch::write_compendium_description()</code> and you
2211
+
will find the details listed in the DESCRIPTION file under the ‘Depends’
2212
+
and ‘Remotes’ sections. <strong>IMPORTANT</strong>: Delete the
2213
+
<code>DESCRIPTION</code> file Before launching the binder build. In my
2214
+
experience the DESCRIPTION file will conflict with the binder’s build
2215
+
process. <br> For non-CRAN packages – specifically packages installed
2216
+
from GitHub – I recommend using the format:
2217
+
<code>remotes::install_github("gadenbuie/countdown")</code> for each
2218
+
package that is not on CRAN. CRAN packages can follow the format:
2219
+
<code>install.packages("dplyr")</code></p>
2185
2220
</blockquote>
2186
2221
<olstart="2" type="a">
2187
-
<li>Create a <code>runtime.txt</code> file and store it in the RStudio Project’s root directory<br> Follow the example at <ahref="https://github.com/binder-examples/r" class="uri">https://github.com/binder-examples/r</a><br></li>
2222
+
<li>Create a <code>runtime.txt</code> file and store it in the RStudio
2223
+
Project’s root directory<br> Follow the example at <a
<p>Note: If you try using <code>holepunch</code>, it will store these files in a <code>.binder</code> subdirectory. In my experience this will cause the binder build to fail. For this reason, I don’t recommend using holepunch and I do recommend storing the two files in the Project root directory.</p>
2228
+
<p>Note: If you try using <code>holepunch</code>, it will store these
2229
+
files in a <code>.binder</code> subdirectory. In my experience this will
2230
+
cause the binder build to fail. For this reason, I don’t recommend using
2231
+
holepunch and I do recommend storing the two files in the project’s root
2232
+
directory.</p>
2191
2233
</blockquote>
2192
2234
<p><strong>Step 2</strong></p>
2193
-
<p>Generate a binder badge with <code>holepunch::generate_badge()</code>. This should store the badge in your GitHub’s project <code>README.md</code> file. Then <code>commit</code> and <code>push</code> your changes to GitHub; go to the README on GitHub, launch the build and wait for the long launch/build time.</p>
2235
+
<p>Generate a binder badge with
2236
+
<code>usethis::use_binder_badge(urlpath = "rstudio")</code>. This should
2237
+
store the badge in your GitHub’s project <code>README</code> file. Then
2238
+
<code>commit</code> and <code>push</code> your changes to GitHub; go to
2239
+
the README on GitHub, launch the build and wait for the long
2240
+
launch/build time.</p>
2241
+
<p>Hint: be prepared to wait. The first build can take some time.
2242
+
Sometimes you must launch an initial or dormant build more than once. In
2243
+
my experienced these hiccups are rare, but try the launch twice before
2244
+
getting involved in extensive troubleshooting.</p>
2194
2245
<!-- a. Edit the `.binder/install.R` file using the following [model](https://github.com/binder-examples/r/blob/master/install.R). -->
2195
2246
<!-- b. Edit the `binder/install.R` file based on this [model](https://github.com/binder-examples/r/blob/master/runtime.txt) or the [documentation](https://github.com/jupyterhub/repo2docker/pull/772#issue-313426641) -->
2196
2247
<!-- b. Edit the `DESCRIPTION` file using this basic [model](https://github.com/libjohn/workshop_twitter_analysis/blob/main/DESCRIPTION). **Modify all the fields**. You may want to base the `Depends` and `Remotes` sections on your `.binder/install.R` file -->
2197
2248
<hr/>
2198
-
<p><em>The old documentation from this site can be found in the <ahref="https://github.com/data-and-visualization/git-tutorial/releases/tag/v0.9.2019">v.0.2019 release</a> on GitHub</em>.</p>
2199
-
<divclass="sourceCode" id="cb1"><preclass="sourceCode r distill-force-highlighting-css"><codeclass="sourceCode r"></code></pre></div>
2249
+
<p><em>The old documentation from this site can be found in the <a
class="sourceCode r distill-force-highlighting-css"><codeclass="sourceCode r"></code></pre></div>
2200
2254
<!--radix_placeholder_article_footer-->
2201
2255
<!--/radix_placeholder_article_footer-->
2202
2256
</div>
@@ -2218,7 +2272,9 @@ <h3 id="reuse">Reuse</h3>
2218
2272
<!--radix_placeholder_navigation_after_body-->
2219
2273
<divclass="distill-site-nav distill-site-footer">
2220
2274
<p><ahref="https://rfun.library.duke.edu/">R We Having Fun Yet‽</a></p>
2221
-
<p><ahref="https://library.duke.edu/data/">Center for Data & Visualization Sciences</a>. <ahref="https://library.duke.edu/">Duke University Libraries</a></p>
2275
+
<p><ahref="https://library.duke.edu/data/">Center for Data &
Downloaded and evaluated for free. $100 / 3-years of upgrades.<br/>
2124
2133
</li>
2125
-
<li>GitKracken – <strong>Free</strong> if you have the <ahref="https://education.github.com/pack">GitHub Student</a> Pack or the <ahref="https://www.gitkraken.com/github-teacher-toolbox">GitHub Teacher toolbox</a></li>
2126
-
<li><ahref="https://www.sourcetreeapp.com/">SourceTree</a> – Free. (defaults to use with <ahref="https://bitbucket.org/">BitBucket</a>)</li>
2134
+
<li>GitKracken – <strong>Free</strong> if you have the <a
2135
+
href="https://education.github.com/pack">GitHub Student</a> Pack or the
to make your reproducible code a container on binder.org</li>
2132
2149
</ul>
2133
2150
<h3id="free-book">Free Book</h3>
2134
2151
<ul>
2135
-
<li><ahref="http://happygitwithr.com/">Happy Git and GitHub for the useR</a></li>
2152
+
<li><ahref="http://happygitwithr.com/">Happy Git and GitHub for the
2153
+
useR</a></li>
2136
2154
</ul>
2137
2155
<h3id="handy-article">Handy Article</h3>
2138
2156
<ul>
2139
-
<li><ahref="https://www.codementor.io/citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd">10 Common Problems / Solutions</a></li>
<li>Making your research reproducible with TIER + R + GitHub <ahref="#slides">Slides</a>. Cetinkaya-Rundel, M. (2016). Open Science Framework. Retrieved from <ahref="https://osf.io/phyau" class="uri">https://osf.io/phyau</a></li>
<li>Making your research reproducible with TIER + R + GitHub <a
2169
+
href="#slides">Slides</a>. Cetinkaya-Rundel, M. (2016). Open Science
2170
+
Framework. Retrieved from <ahref="https://osf.io/phyau"
2171
+
class="uri">https://osf.io/phyau</a></li>
2146
2172
</ul>
2147
-
<divclass="sourceCode" id="cb1"><preclass="sourceCode r distill-force-highlighting-css"><codeclass="sourceCode r"></code></pre></div>
2173
+
<divclass="sourceCode" id="cb1"><pre
2174
+
class="sourceCode r distill-force-highlighting-css"><codeclass="sourceCode r"></code></pre></div>
2148
2175
<!--radix_placeholder_article_footer-->
2149
2176
<!--/radix_placeholder_article_footer-->
2150
2177
</div>
@@ -2166,7 +2193,9 @@ <h3 id="reuse">Reuse</h3>
2166
2193
<!--radix_placeholder_navigation_after_body-->
2167
2194
<divclass="distill-site-nav distill-site-footer">
2168
2195
<p><ahref="https://rfun.library.duke.edu/">R We Having Fun Yet‽</a></p>
2169
-
<p><ahref="https://library.duke.edu/data/">Center for Data & Visualization Sciences</a>. <ahref="https://library.duke.edu/">Duke University Libraries</a></p>
2196
+
<p><ahref="https://library.duke.edu/data/">Center for Data &
0 commit comments