---
title: "Using `SpaDES.addins` with RStudio"
author:
  - "Alex M. Chubaty"
date: '`r strftime(Sys.Date(), "%B %d %Y")`'
output:
  rmarkdown::html_vignette:
    fig_width: 7
    number_sections: yes
    self_contained: yes
    toc: yes
vignette: >
  %\VignetteIndexEntry{Using SpaDES.addins with RStudio}
  %\VignetteDepends{SpaDES.addins}
  %\VignetteKeyword{cache}
  %\VignetteEncoding{UTF-8}
  %\VignetteEngine{knitr::rmarkdown}
editor_options: 
  chunk_output_type: console
---

# Using RStudio addins

RStudio addins provide a graphical interface for performing common tasks.
After installing the `SpaDES.addins` package, go to the Addins menu in the RStudio IDE to see the list of available addins provided by this package.

![](figures/screenshot_menu.png)

You can assign keyboard shortcuts to any of these addins if you wish.
See https://rstudio.github.io/rstudioaddins/#running-addins.

## `SpaDES` module directory

The default module directory is a temporary one, and can be changed using `SpaDES.core::setPaths()`.
See `?SpaDES.core::setPaths` for details.

We recommend using a single local directory for your `SpaDES` modules.
Thus, only a single module directory is specified when using these addins.

# `SpaDES` module development

## Copy an existing module

The simplest way to get started on developing a `SpaDES` module, is to start from an existing module.
Anytime you wish to modify an existing module, we suggest working from a copy, rather than modifying the existing module directly.
To copy an existing module, simply invoke the *SpaDES: copy module* addin from the RStudio Addins menu.

![](figures/screenshot_copy_module.png)

## Create a new `SpaDES` module from a template

![](figures/screenshot_new_module.png)

# `SpaDES` package development (advanced)

More advanced users planning on contributing code to the `SpaDES` ecosystem of packages, can make use of additional package development tools.
