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
Copy file name to clipboardExpand all lines: CS_11_ParallelProcessing.Rmd
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ subtitle: Write a parallel for loop
4
4
week: 11
5
5
type: Case Study
6
6
reading:
7
-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
8
7
- 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)
9
9
tasks:
10
-
- Write parallel for loops to speed up computation time.
10
+
- Write parallel for loops to process spatial data
11
11
---
12
12
13
13
```{r setup, include=FALSE, purl=F}
@@ -48,7 +48,7 @@ Write an Rmd script that:
48
48
* Loads the `world` dataset in the `spData` package
49
49
* Runs a parallel `foreach()` to loop over countries (`name_long`) and:
50
50
*`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.
52
52
* set `.combine=rbind` to return a simple matrix.
53
53
* Confirm that you get the same answer without using foreach:
54
54
* imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.
Copy file name to clipboardExpand all lines: CS_11_ParallelProcessing.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,23 @@ subtitle: Write a parallel for loop
4
4
week: 11
5
5
type: Case Study
6
6
reading:
7
-
- CRAN Task View [High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)
8
7
- 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)
9
9
tasks:
10
-
- Write parallel for loops to speed up computation time.
10
+
- Write parallel for loops to process spatial data
11
11
---
12
12
13
13
14
14
15
15
# Reading
16
16
17
-
- list(`CRAN [Task View` = "High-Performance and Parallel Computing with R](http://cran.r-project.org/web/views/HighPerformanceComputing.html)")
18
17
- 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)
19
19
20
20
21
21
# Tasks
22
22
23
-
- Write parallel for loops to speed up computation time.
23
+
- Write parallel for loops to process spatial data
24
24
25
25
## Background
26
26
@@ -47,7 +47,7 @@ Write an Rmd script that:
47
47
* Loads the `world` dataset in the `spData` package
48
48
* Runs a parallel `foreach()` to loop over countries (`name_long`) and:
49
49
*`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.
51
51
* set `.combine=rbind` to return a simple matrix.
52
52
* Confirm that you get the same answer without using foreach:
53
53
* imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.
Copy file name to clipboardExpand all lines: docs/CS_11_ParallelProcessing.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -419,14 +419,14 @@ <h3 class="subtitle"><em>Write a parallel for loop</em></h3>
419
419
<divid="reading" class="section level1">
420
420
<h1>Reading</h1>
421
421
<ul>
422
-
<li>list(<code>CRAN [Task View</code> = “High-Performance and Parallel Computing with R](<ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html" class="uri">http://cran.r-project.org/web/views/HighPerformanceComputing.html</a>)”)</li>
423
422
<li>Parallel <ahref="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 <ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
424
424
</ul>
425
425
</div>
426
426
<divid="tasks" class="section level1">
427
427
<h1>Tasks</h1>
428
428
<ul>
429
-
<li>Write parallel for loops to speed up computation time.</li>
429
+
<li>Write parallel for loops to process spatial data</li>
430
430
</ul>
431
431
<divid="background" class="section level2">
432
432
<h2>Background</h2>
@@ -446,7 +446,7 @@ <h2>Background</h2>
446
446
<li>Runs a parallel <code>foreach()</code> to loop over countries (<code>name_long</code>) and:
447
447
<ul>
448
448
<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>
450
450
<li>set <code>.combine=rbind</code> to return a simple matrix.</li>
451
451
</ul></li>
452
452
<li>Confirm that you get the same answer without using foreach:
<li>CRAN Task View <ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High-Performance and Parallel Computing with R</a></li>
796
795
<li>Parallel <ahref="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 <ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
797
797
</ul>
798
798
<h2id="tasks-19">Tasks</h2>
799
799
<ul>
800
-
<li>Write parallel for loops to speed up computation time.</li>
800
+
<li>Write parallel for loops to process spatial data</li>
<li>CRAN Task View <ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High-Performance and Parallel Computing with R</a></li>
796
795
<li>Parallel <ahref="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 <ahref="http://cran.r-project.org/web/views/HighPerformanceComputing.html">High Performance and Parallel Computing with R</a></li>
797
797
</ul>
798
798
<h2id="tasks-19">Tasks</h2>
799
799
<ul>
800
-
<li>Write parallel for loops to speed up computation time.</li>
800
+
<li>Write parallel for loops to process spatial data</li>
#' * Loads the `world` dataset in the `spData` package
39
39
#' * Runs a parallel `foreach()` to loop over countries (`name_long`) and:
40
40
#' * `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.
42
42
#' * set `.combine=rbind` to return a simple matrix.
43
43
#' * Confirm that you get the same answer without using foreach:
44
44
#' * imply use `st_is_within_distance` with the transformed `world` object as both `x` and `y` object.
0 commit comments