Skip to content

Commit 04670b4

Browse files
author
Adam M. Wilson
committed
udpate parallel processing
1 parent 308da47 commit 04670b4

11 files changed

+27
-27
lines changed

CS_11_ParallelProcessing.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ subtitle: Write a parallel for loop
44
week: 11
55
type: Case Study
66
reading:
7-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
87
- Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
8+
- CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
99
tasks:
10-
- Write parallel for loops to speed up computation time.
10+
- Write parallel for loops to process spatial data
1111
---
1212

1313
```{r setup, include=FALSE, purl=F}
@@ -48,7 +48,7 @@ Write an Rmd script that:
4848
* Loads the `world` dataset in the `spData` package
4949
* Runs a parallel `foreach()` to loop over countries (`name_long`) and:
5050
* `filter` the world object to include only on country at a time.
51-
* use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `T` for countries within the distance.
51+
* use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `TRUE/FALSE` for countries within the distance.
5252
* set `.combine=rbind` to return a simple matrix.
5353
* Confirm that you get the same answer without using foreach:
5454
* imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.

CS_11_ParallelProcessing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ subtitle: Write a parallel for loop
44
week: 11
55
type: Case Study
66
reading:
7-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
87
- Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
8+
- CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
99
tasks:
10-
- Write parallel for loops to speed up computation time.
10+
- Write parallel for loops to process spatial data
1111
---
1212

1313

1414

1515
# Reading
1616

17-
- list(`CRAN [Task View` = "High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)")
1817
- Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
18+
- CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
1919

2020

2121
# Tasks
2222

23-
- Write parallel for loops to speed up computation time.
23+
- Write parallel for loops to process spatial data
2424

2525
## Background
2626

@@ -47,7 +47,7 @@ Write an Rmd script that:
4747
* Loads the `world` dataset in the `spData` package
4848
* Runs a parallel `foreach()` to loop over countries (`name_long`) and:
4949
* `filter` the world object to include only on country at a time.
50-
* use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `T` for countries within the distance.
50+
* use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `TRUE/FALSE` for countries within the distance.
5151
* set `.combine=rbind` to return a simple matrix.
5252
* Confirm that you get the same answer without using foreach:
5353
* imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.

Tasklist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ ___
332332

333333
<a class="btn btn-link" href="./CS_11_ParallelProcessing.html" role="button" >Full Description</a><button data-toggle="collapse" class="btn btn-link" data-target="#i20">Preview Readings & Tasks </button><div id="i20" class="collapse">
334334
## Readings
335-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
336335
- Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
336+
- CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
337337

338338
## Tasks
339-
- Write parallel for loops to speed up computation time.
339+
- Write parallel for loops to process spatial data
340340
</div>
341341
___
342342
## [ TK_11 : Project First Draft ]( ./TK_11.html )

Tasklist_completion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ Below are a set of tasks that we will work on in class (either alone or in small
419419
</tr>
420420
<tr>
421421
<td style="text-align:right;"> 0 </td>
422-
<td style="text-align:left;"> Write parallel for loops to speed up computation time. </td>
422+
<td style="text-align:left;"> Write parallel for loops to process spatial data </td>
423423
<td style="text-align:left;"> [CS_11_ParallelProcessing](./CS_11_ParallelProcessing.html) </td>
424424
<td style="text-align:right;"> 11 </td>
425425
</tr>

Tasklist_new.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ ___
332332

333333
<a class="btn btn-link" href="./CS_11_ParallelProcessing.html" role="button" >Full Description</a><button data-toggle="collapse" class="btn btn-link" data-target="#i20">Preview Readings & Tasks </button><div id="i20" class="collapse">
334334
## Readings
335-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
336335
- Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
336+
- CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
337337

338338
## Tasks
339-
- Write parallel for loops to speed up computation time.
339+
- Write parallel for loops to process spatial data
340340
</div>
341341
___
342342
## [ TK_11 : Project First Draft ]( ./TK_11.html )

docs/CS_11_ParallelProcessing.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,14 @@ <h3 class="subtitle"><em>Write a parallel for loop</em></h3>
419419
<div id="reading" class="section level1">
420420
<h1>Reading</h1>
421421
<ul>
422-
<li>list(<code>CRAN [Task View</code> = “High-Performance and Parallel Computing with R](<a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html" class="uri">http://cran.r-project.org/web/views/HighPerformanceComputing.html</a>)”)</li>
423422
<li>Parallel <a href="https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64">Computing with the R Language in a Supercomputing Environment</a></li>
423+
<li>CRAN Task View <a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
424424
</ul>
425425
</div>
426426
<div id="tasks" class="section level1">
427427
<h1>Tasks</h1>
428428
<ul>
429-
<li>Write parallel for loops to speed up computation time.</li>
429+
<li>Write parallel for loops to process spatial data</li>
430430
</ul>
431431
<div id="background" class="section level2">
432432
<h2>Background</h2>
@@ -446,7 +446,7 @@ <h2>Background</h2>
446446
<li>Runs a parallel <code>foreach()</code> to loop over countries (<code>name_long</code>) and:
447447
<ul>
448448
<li><code>filter</code> the world object to include only on country at a time.</li>
449-
<li>use <code>st_is_within_distance</code> to find the distance from that country to all other countries in the <code>world</code> object within 100000m Set <code>sparse=F</code> to return a simple array of <code>T</code> for countries within the distance.</li>
449+
<li>use <code>st_is_within_distance</code> to find the distance from that country to all other countries in the <code>world</code> object within 100000m Set <code>sparse=F</code> to return a simple array of <code>TRUE/FALSE</code> for countries within the distance.</li>
450450
<li>set <code>.combine=rbind</code> to return a simple matrix.</li>
451451
</ul></li>
452452
<li>Confirm that you get the same answer without using foreach:

docs/Tasklist.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,12 +792,12 @@ <h2><a href="./CS_11_ParallelProcessing.html">CS_11_ParallelProcessing : Paralle
792792
<div id="i20" class="collapse">
793793
<h2 id="readings-19">Readings</h2>
794794
<ul>
795-
<li>CRAN Task View <a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High-Performance and Parallel Computing with R</a></li>
796795
<li>Parallel <a href="https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64">Computing with the R Language in a Supercomputing Environment</a></li>
796+
<li>CRAN Task View <a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
797797
</ul>
798798
<h2 id="tasks-19">Tasks</h2>
799799
<ul>
800-
<li>Write parallel for loops to speed up computation time.</li>
800+
<li>Write parallel for loops to process spatial data</li>
801801
</ul>
802802
</div>
803803
<hr />

docs/Tasklist_completion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ <h1 class="title toc-ignore">Task Completion list</h1>
13631363
0
13641364
</td>
13651365
<td style="text-align:left;">
1366-
Write parallel for loops to speed up computation time.
1366+
Write parallel for loops to process spatial data
13671367
</td>
13681368
<td style="text-align:left;">
13691369
<a href="./CS_11_ParallelProcessing.html">CS_11_ParallelProcessing</a>

docs/Tasklist_new.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,12 +792,12 @@ <h2><a href="./CS_11_ParallelProcessing.html">CS_11_ParallelProcessing : Paralle
792792
<div id="i20" class="collapse">
793793
<h2 id="readings-19">Readings</h2>
794794
<ul>
795-
<li>CRAN Task View <a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High-Performance and Parallel Computing with R</a></li>
796795
<li>Parallel <a href="https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64">Computing with the R Language in a Supercomputing Environment</a></li>
796+
<li>CRAN Task View <a href="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
797797
</ul>
798798
<h2 id="tasks-19">Tasks</h2>
799799
<ul>
800-
<li>Write parallel for loops to speed up computation time.</li>
800+
<li>Write parallel for loops to process spatial data</li>
801801
</ul>
802802
</div>
803803
<hr />

docs/scripts/CS_11_ParallelProcessing.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#' week: 11
55
#' type: Case Study
66
#' reading:
7-
#' - CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
87
#' - Parallel [Computing with the R Language in a Supercomputing Environment](https://link.springer.com/chapter/10.1007/978-3-642-13872-0_64)
8+
#' - CRAN Task View [High Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
99
#' tasks:
10-
#' - Write parallel for loops to speed up computation time.
10+
#' - Write parallel for loops to process spatial data
1111
#' ---
1212
#'
1313
#'
@@ -38,7 +38,7 @@ getDoParWorkers() # check registered cores
3838
#' * Loads the `world` dataset in the `spData` package
3939
#' * Runs a parallel `foreach()` to loop over countries (`name_long`) and:
4040
#' * `filter` the world object to include only on country at a time.
41-
#' * use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `T` for countries within the distance.
41+
#' * use `st_is_within_distance` to find the distance from that country to all other countries in the `world` object within 100000m Set `sparse=F` to return a simple array of `TRUE/FALSE` for countries within the distance.
4242
#' * set `.combine=rbind` to return a simple matrix.
4343
#' * Confirm that you get the same answer without using foreach:
4444
#' * imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.

0 commit comments

Comments
 (0)