<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <title>Natverse</title>
    <meta charset="utf-8" />
    <meta name="author" content="Sridhar Jagannathan" />
    <meta name="date" content="2019-07-26" />
    <link href="libs/remark-css/default.css" rel="stylesheet" />
    <link href="libs/remark-css/default-fonts.css" rel="stylesheet" />
  </head>
  <body>
    <textarea id="source">
class: center, middle, inverse, title-slide

# <strong>Natverse</strong>
## <em>Collection of neuroanatomical packages</em>
### Sridhar Jagannathan
### Department of Zoology<br/>MRC LMB<br/>University of Cambridge
### 2019-07-26

---




class: inverse, center, middle

# Motivation

---
# Why?
--

* **`nat`** `\(\rightarrow\)` *`nat`, `elmr`, `catmaid`, `nat.nblast`, ... `catnat`*

--

* **Knowledge gap**&lt;br/&gt;
&lt;center&gt;
      ![](./dont_know_meme.png)
&lt;center&gt;

--

---
class: inverse, middle, center

# multiverse

---

<iframe id="frame1" title="Multiverse" src="nat_packages_all.html" width="800px" height="550px"></iframe>


---

# `tidyverse`

* **Ease of installation, maintenance**&lt;sup&gt;1&lt;/sup&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;center&gt;
      ![](./tidyverse.png)
&lt;center&gt;

&lt;div align="left"&gt;

.footnote[ [1] Tidyverse rationale [#1](https://rviews.rstudio.com/2017/06/08/what-is-the-tidyverse/)]

&lt;/div&gt;

---
class: inverse, middle, center

# Enter natverse

---

background-image: url("./natverse_logo.png")
background-size: 30%

---


<iframe id="frame2" title="natverse" src="natverse_packages_all.html" width="800px%" height="550px"></iframe>


---

# Hello World

Install the **natverse** package from [Github](https://github.com/SridharJagannathan/natverse/):


```r
devtools::install_github("SridharJagannathan/natverse")
```

--

Prerequisites.

- Recommended to use [R-studio](https://www.rstudio.com/)

- Install `devtools` from [CRAN](https://cran.r-project.org/) beforehand

```r
 install.packages("devtools") 
```

--

---
class: inverse, middle, center

# Using natverse

---

- **loading**


```r
 library(natverse) 
```



- **finding conflicts**

    The conflicts created by `natverse` with other packages can be seen with


```r
 natverse_conflicts()
```

```
## ── Conflicts ──────────────────────────────────────────────────────────────────────── natverse_conflicts() ──
## ✖ nat::intersect() masks base::intersect()
## ✖ nat::setdiff()   masks base::setdiff()
## ✖ nat::union()     masks base::union()
```

---
**updating packages: **

For dependencies installed via [CRAN](https://cran.r-project.org/) use
    

```r
 natverse_update(source = 'CRAN')
```
    
For dependencies installed via [Github](https://github.com/) use
    

```r
 natverse_update(source = 'GITHUB')
```

---

# Thanks!

The **natverse** package was influenced by, 

- [Tidyverse](https://www.tidyverse.org/) (opinionated collection of essentials)

- [dtupdate](https://github.com/hrbrmstr/dtupdate) (Keep Up-To-Date with Non-CRAN Package Updates)

- [hexSticker](https://github.com/GuangchuangYu/hexSticker) (Create hex logos from png)

- Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan).

---

# Thanks!

This work was supported by,

- [Gregory Jefferis](https://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/gregory-jefferis/)

- [Alexander Bates](http://flybrain.mrc-lmb.cam.ac.uk/jefferislabwebsite/people/)

- [Philipp Schlegel](http://flybrain.mrc-lmb.cam.ac.uk/jefferislabwebsite/people/)

- [Marta Costa](https://www.zoo.cam.ac.uk/directory/marta-costa)
    </textarea>
<style data-target="print-only">@media screen {.remark-slide-container{display:block;}.remark-slide-scaler{box-shadow:none;}}</style>
<script src="https://remarkjs.com/downloads/remark-latest.min.js"></script>
<script>var slideshow = remark.create({
"highlightStyle": "github",
"highlightLines": true,
"countIncrementalSlides": false
});
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {
  window.dispatchEvent(new Event('resize'));
});
(function(d) {
  var s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler");
  if (!r) return;
  s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }";
  d.head.appendChild(s);
})(document);

(function(d) {
  var el = d.getElementsByClassName("remark-slides-area");
  if (!el) return;
  var slide, slides = slideshow.getSlides(), els = el[0].children;
  for (var i = 1; i < slides.length; i++) {
    slide = slides[i];
    if (slide.properties.continued === "true" || slide.properties.count === "false") {
      els[i - 1].className += ' has-continuation';
    }
  }
  var s = d.createElement("style");
  s.type = "text/css"; s.innerHTML = "@media print { .has-continuation { display: none; } }";
  d.head.appendChild(s);
})(document);
// delete the temporary CSS (for displaying all slides initially) when the user
// starts to view slides
(function() {
  var deleted = false;
  slideshow.on('beforeShowSlide', function(slide) {
    if (deleted) return;
    var sheets = document.styleSheets, node;
    for (var i = 0; i < sheets.length; i++) {
      node = sheets[i].ownerNode;
      if (node.dataset["target"] !== "print-only") continue;
      node.parentNode.removeChild(node);
    }
    deleted = true;
  });
})();</script>

<script>
(function() {
  var links = document.getElementsByTagName('a');
  for (var i = 0; i < links.length; i++) {
    if (/^(https?:)?\/\//.test(links[i].getAttribute('href'))) {
      links[i].target = '_blank';
    }
  }
})();
</script>

<script>
slideshow._releaseMath = function(el) {
  var i, text, code, codes = el.getElementsByTagName('code');
  for (i = 0; i < codes.length;) {
    code = codes[i];
    if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
      text = code.textContent;
      if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
          /^\$\$(.|\s)+\$\$$/.test(text) ||
          /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
        code.outerHTML = code.innerHTML;  // remove <code></code>
        continue;
      }
    }
    i++;
  }
};
slideshow._releaseMath(document);
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.src  = 'https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML';
  if (location.protocol !== 'file:' && /^https?:/.test(script.src))
    script.src  = script.src.replace(/^https?:/, '');
  document.getElementsByTagName('head')[0].appendChild(script);
})();
</script>
  </body>
</html>
