Skip to content

Commit bf37e31

Browse files
committed
Taster guide tweaks
1 parent dffb3f5 commit bf37e31

7 files changed

Lines changed: 45 additions & 35 deletions

File tree

_freeze/posts/setting_up_w_r_online/index/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ <h5 class="quarto-listing-category-title">Categories</h5><div class="quarto-list
214214

215215
<div class="quarto-listing quarto-listing-container-default" id="listing-listing">
216216
<div class="list quarto-listing-default">
217-
<div class="quarto-post image-right" data-index="0" data-categories="training,code" data-listing-date-sort="1747350000000" data-listing-file-modified-sort="1747668821204" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="6" data-listing-word-count-sort="1109">
217+
<div class="quarto-post image-right" data-index="0" data-categories="training,code" data-listing-date-sort="1747350000000" data-listing-file-modified-sort="1747739873615" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="6" data-listing-word-count-sort="1141">
218218
<div class="thumbnail">
219219
<p><a href="./posts/setting_up_w_r_online/index.html" class="no-external"></a></p><a href="./posts/setting_up_w_r_online/index.html" class="no-external">
220-
<p class="card-img-top"><img src="posts/setting_up_w_r_online/rstudio_online.png" class="thumbnail-image card-img"/></p>
220+
<p class="card-img-top"><img src="posts/setting_up_w_r_online/newproject.png" class="thumbnail-image card-img"/></p>
221221
</a><p><a href="./posts/setting_up_w_r_online/index.html" class="no-external"></a></p>
222222
</div>
223223
<div class="body">
224224
<h3 class="no-anchor listing-title">
225-
<a href="./posts/setting_up_w_r_online/index.html" class="no-external">Getting started with using R and RStudio (in the cloud or on your own machine)</a>
225+
<a href="./posts/setting_up_w_r_online/index.html" class="no-external">Getting started with using R and RStudio (in the cloud or on your own computer)</a>
226226
</h3>
227227
<div class="listing-subtitle">
228228
<a href="./posts/setting_up_w_r_online/index.html" class="no-external"></a>

docs/posts/setting_up_w_r_online/index.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<meta name="author" content="Dan Olner">
1010
<meta name="dcterms.date" content="2025-05-16">
1111

12-
<title>Getting started with using R and RStudio (in the cloud or on your own machine) – Dan Olner’s Data Dispatch</title>
12+
<title>Getting started with using R and RStudio (in the cloud or on your own computer) – Dan Olner’s Data Dispatch</title>
1313
<style>
1414
code{white-space: pre-wrap;}
1515
span.smallcaps{font-variant: small-caps;}
@@ -158,7 +158,7 @@
158158
<header id="title-block-header" class="quarto-title-block default page-columns page-full">
159159
<div class="quarto-title-banner page-columns page-full">
160160
<div class="quarto-title column-body">
161-
<h1 class="title">Getting started with using R and RStudio (in the cloud or on your own machine)</h1>
161+
<h1 class="title">Getting started with using R and RStudio (in the cloud or on your own computer)</h1>
162162
<div class="quarto-categories">
163163
<div class="quarto-category">training</div>
164164
<div class="quarto-category">code</div>
@@ -200,30 +200,31 @@ <h1 class="title">Getting started with using R and RStudio (in the cloud or on y
200200

201201
<section id="using-r-and-rstudio-1-on-your-own-computer-or-2-posit.cloud-in-the-browser" class="level2">
202202
<h2 class="anchored" data-anchor-id="using-r-and-rstudio-1-on-your-own-computer-or-2-posit.cloud-in-the-browser">Using R and RStudio: (1) on your own computer or (2) posit.cloud in the browser</h2>
203-
<p>I’m running an “R + regional economic data” taster session in June. It won’t be necessary to use R during the session to follow along - <strong>but if you want to have a go at running the code I’ll be talking through and don’t yet have R/RStudio, here’s how to get quickly set up</strong>, either online or on your own computer<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>.</p>
203+
<p>I’m running an “R + regional economic data” taster session in June. It won’t be necessary to use R during the session to follow along - <strong>but if you want to have a go at running the code I’ll be talking through and don’t yet have R/RStudio, here’s how to get quickly set up</strong>, either online through a browser, or with R and RStudio installed on your own computer<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>.</p>
204204
<p>To do this, you’ll need to do <strong>one</strong> of the following:</p>
205205
<ol type="1">
206206
<li><p><strong>Use RStudio in your browser with a <a href="https://posit.cloud">posit.cloud account</a></strong>. The <strong>free version</strong> is limited (very small memory, for instance) but <strong>it’s a very quick and easy option to have a play with R</strong> and will be fine for the taster session. <strong>The next section below talks through setting up in posit.cloud.</strong></p></li>
207-
<li><p><strong>Use R and RStudio on your own computer</strong>. If you have a machine where you’re able to install your own software <a href="https://cran.rstudio.com/">then go here</a> to download/install the right version of R for your operating system, and <a href="https://posit.co/download/rstudio-desktop/">here to download/install RStudio</a> (again, pick the correct one for your OS). (Though see bullet point 2 below if using a work machine.)</p></li>
207+
<li><p><strong>Install R and RStudio on your own computer</strong>. If you have a machine where you’re able to install your own software <a href="https://cran.rstudio.com/">then go here</a> to download/install the right version of R for your operating system, and <a href="https://posit.co/download/rstudio-desktop/">here to download/install RStudio</a> (again, pick the correct one for your OS). (Though see bullet point 2 below if using a work machine.)</p></li>
208208
</ol>
209209
<ul>
210210
<li>The next chunk will talk through <strong>setting up a posit.cloud project.</strong></li>
211211
<li>The chunk after that talks through getting started with an RStudio project, and will <strong>be nearly the same</strong> whether you’re using RStudio online or on your machine (with just one tweak, explained in the breakout box).</li>
212212
</ul>
213213
<p>Any questions/issues, let me know at d dot older at sheffield dot ac dot uk or <a href="https://www.linkedin.com/in/danolner/">message me on LinkedIn</a> and I’ll try to answer.</p>
214214
</section>
215-
<section id="if-using-rstudio-online-set-up-posit.cloud-account-and-create-your-rstudio-project" class="level2">
216-
<h2 class="anchored" data-anchor-id="if-using-rstudio-online-set-up-posit.cloud-account-and-create-your-rstudio-project">If using RStudio online: set up posit.cloud account and create your RStudio project</h2>
215+
<section id="if-using-rstudio-online-set-up-a-posit.cloud-account-and-create-your-rstudio-project" class="level2">
216+
<h2 class="anchored" data-anchor-id="if-using-rstudio-online-set-up-a-posit.cloud-account-and-create-your-rstudio-project">If using RStudio online: set up a posit.cloud account and create your RStudio project</h2>
217217
<p>Here’s the steps to get up and running through a browser using posit.cloud.</p>
218218
<ul>
219219
<li><a href="https://login.posit.cloud/login">Create an account at posit.cloud</a> using the ‘sign up’ box, and then log in. That’ll take you to your online workspace.</li>
220220
<li>Click the <strong>new project</strong> button, top right</li>
221-
<li>Select ‘new project from templateand then “Data Analysis in R with the tidyverse” (if not already selected). This comes pre-installed with the tidyverse package, which we’ll be using. Select then click OK down at the bottom. <strong>This will open your RStudio project where we’ll do the coding.</strong></li>
221+
<li>Select ‘<strong>new project from template</strong>’ (as in the pic below) and then “Data Analysis in R with the tidyverse” (if not already selected). This template comes pre-installed with the tidyverse package, which we’ll be using. Select then click OK down at the bottom. <strong>This will open your RStudio project where we’ll do the coding.</strong></li>
222222
</ul>
223+
<p><img src="newproject.png" class="img-fluid"></p>
223224
</section>
224225
<section id="make-a-new-r-script-and-add-a-library" class="level2">
225226
<h2 class="anchored" data-anchor-id="make-a-new-r-script-and-add-a-library">Make a new R script and add a library</h2>
226-
<p>Now you should <strong>either be in RStudio online through posit.cloud</strong> or <strong>you’ve opened RStudio on your own machine.</strong> From here…</p>
227+
<p>Now you should <strong>either be in RStudio online through posit.cloud</strong> or <strong>if using RStudio installed on your own computer, open that now</strong>. From here…</p>
227228
<ul>
228229
<li><strong>Create a new R script</strong> by going to ‘file &gt; new file &gt; new R script’ (or using the <strong>CTRL+SHIFT+N</strong> shortcut). A new script will appear, currently just called <em>‘Untitled1’</em> until it’s saved for the first time.</li>
229230
<li><strong>At this point, it should look something like this:</strong></li>
@@ -286,12 +287,12 @@ <h2 class="anchored" data-anchor-id="make-a-new-r-script-and-add-a-library">Make
286287
<h2 class="anchored" data-anchor-id="running-code-in-an-r-script-loading-the-tidyverse-library">Running code in an R script / loading the tidyverse library</h2>
287288
<p>All code will run in the console - what we do with scripts is just send our written code to the console. We do this in a couple of ways:</p>
288289
<ol type="1">
289-
<li>In your R script, if no code text is highlighted/selected, RStudio will <strong>Run the code line by line</strong> (or chunk by chunk, but we’ll come to that).</li>
290-
<li>If a block of text is highlighed, the whole block will run. So e.g.&nbsp;if you select-all in a script and then run it, the entire script will run.</li>
290+
<li>In your R script, if no code text is highlighted/selected, RStudio will <strong>Run the code line by line</strong> (or chunk by chunk - we’ll cover that in the taster session).</li>
291+
<li>If a block of text is highlighted, the whole block will run. So e.g.&nbsp;if you select-all in a script and then run it, the entire script will run.</li>
291292
</ol>
292293
<p>Let’s do #1: <strong>Run the code line by line</strong>.</p>
293294
<ul>
294-
<li><strong>To test this, we’ll load the tidyverse library with the code we just pasted in</strong>: put the cursor at the end of the <code>libary(tidyverse)</code> line in the script (if it’s not there already), either with the mouse or keyboard. (Keyboard navigation is mostly the same as any other text editor like Word, but <a href="https://support.posit.co/hc/en-us/articles/200711853-Keyboard-Shortcuts-in-the-RStudio-IDE">here’s a full shortcut list</a> if useful.)</li>
295+
<li><strong>To test this, we’ll load the tidyverse library with the code we just pasted in</strong> (which is just one line of code at the moment!) Put the cursor at the end of the <code>libary(tidyverse)</code> line in the script (if it’s not there already), either with the mouse or keyboard. (Keyboard navigation is mostly the same as any other text editor like Word, but <a href="https://support.posit.co/hc/en-us/articles/200711853-Keyboard-Shortcuts-in-the-RStudio-IDE">here’s a full shortcut list</a> if useful.)</li>
295296
<li>Once there, either use the ‘run’ button, top right of the script window, or (much easier if you’re doing this repeatedly) <strong>press CTRL+ENTER to run it.</strong></li>
296297
</ul>
297298
<p>You should see the code get sent to the console, and a message like the one below confirming that R is ‘Attaching core tidyverse packages’. <strong>The tidyverse library is now loaded</strong>.</p>
17.4 KB
Loading

0 commit comments

Comments
 (0)