-
Notifications
You must be signed in to change notification settings - Fork 1
/
tuts0102-creating-a-module.Rmd
28 lines (20 loc) · 1.36 KB
/
tuts0102-creating-a-module.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
title: "Creating a Module"
---
In this section we will create a jamovi module from scratch, and install it into jamovi. This section builds on knowledge from the previous: *[Getting Started](tuts0101-getting-started.Rmd)*.
The easiest way to create a module for jamovi is with the `create()` function from the `jmvtools` package:
```{r eval=FALSE }
jmvtools::create('SuperAwesome')
```
This will create a module called `SuperAwesome` in the current working directory. If we now look at the contents of the freshly minted SuperAwesome, we will find:
```
SuperAwesome/
├── DESCRIPTION
├── NAMESPACE
├── jamovi/
| └── 0000.yaml
└── R/
```
This should seem suspiciously familiar to anyone who's worked on R packages before. That's because jamovi modules *are* R packages, but with that additional `jamovi/0000.yaml` file. With that file, this package becomes a dual citizen: it can be built into an R package, and it can be built into a jamovi module.
If you take a look in the `0000.yaml` file, you'll notice it contains a very similar set of values to the `DESCRIPTION` file. However, as we add analyses to the module, they will come to be listed in this file as well. In the early stages of development, there's not much need to interact with this file, so we'll return to it later.
Next: [Creating an Analysis](tuts0103-creating-an-analysis.html)