Skip to content

Commit

Permalink
First commit with examples contributed by Ken Andersen.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavdelius committed Apr 1, 2020
1 parent 05856b5 commit 32f48c9
Show file tree
Hide file tree
Showing 38 changed files with 3,527 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
^mizerExamples\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^README\.Rmd$
^cran-comments\.md$
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
21 changes: 21 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Package: mizerExamples
Title: A crowd-sourced repository of mizer size-spectrum models for various ecosystems
Version: 0.0.0.9000
Author: mizer users worldwide
Maintainer: Gustav Delius <[email protected]>
Description: Please contribute your mizer model for others to explore and give feedback on
License: GPL-3
Imports:
mizer (>= 1.0.1.9001)
Suggests:
pkgdown,
rmarkdown,
roxygen2,
testthat
Collate:
data.R
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.0.2
URL: https://github.com/sizespectrum/mizerExamples
BugReports: https://github.com/sizespectrum/mizerExamples/issues
595 changes: 595 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by roxygen2: do not edit by hand

110 changes: 110 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Benguela current ----
#' Example MizerParams object for the Benguela current
#'
#' Created with purely size-based predation, i.e., no species-specific
#' interactions. Set up with three fishing gears targeting small, medium and
#' large species. Vulnerabilities are represented by changing the clearance rate
#' constant (gamma) between species. Calibrated to efforts
#' \code{effort = c(small = 0.13, medium = 0.05, large = 0.45)}.
#' @examples
#' \dontrun{
#' sim = project(Benguela_params, effort = c(small = 0.13, medium = 0.05, large = 0.45))
#' plot(sim)
#' }
#' @format A MizerParams object
#' @source{N.S. Jacobsen, M. Burgess and K.H. Andersen (2017):
#' Efficiency of fisheries is increasing at the ecosystem level.
#' Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171.}
#' @docType data
#' @name Benguela_params
#' @family example parameter objects
NULL

# Baltic Sea ----
#' Example MizerParams object for the Central Baltic Sea
#'
#' Created with purely size-based predation, i.e., no species-specific
#' interactions. Set up with three fishing gears targeting small, medium and
#' large species. Vulnerabilities are represented by changing the clearance rate
#' constant (gamma) between species. Calibrated to efforts
#' \code{effort = c(small = 0.3, medium = 0.3, large = 0.7)}.
#' @examples
#' \dontrun{
#' sim = project(Baltic_params, effort = c(small = 0.3, medium = 0.3, large = 0.7))
#' plot(sim)
#' }
#' @format A MizerParams object
#' @source{N.S. Jacobsen, M. Burgess and K.H. Andersen (2017):
#' Efficiency of fisheries is increasing at the ecosystem level.
#' Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171.}
#' @docType data
#' @name Baltic_params
#' @family example parameter objects
NULL

# Barents Sea ----
#' Example MizerParams object for the Barents Sea
#'
#' Created with purely size-based predation, i.e., no species-specific
#' interactions. Set up with three fishing gears targeting small, medium and
#' large species. Vulnerabilities are represented by changing the clearance rate
#' constant (gamma) between species. Calibrated to efforts
#' \code{effort = c(small = 1.1, medium = 0.5, large = 0.75)}.
#' @examples
#' \dontrun{
#' sim = project(Barents_params, effort = c(small = 1.1, medium = 0.5, large = 0.75))
#' plot(sim)
#' }
#' @format A MizerParams object
#' @source{N.S. Jacobsen, M. Burgess and K.H. Andersen (2017):
#' Efficiency of fisheries is increasing at the ecosystem level.
#' Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171.}
#' @docType data
#' @name Barents_params
#' @family example parameter objects
NULL

# North-East US ----
#' Example MizerParams object for the North East US Continental Shelf (NEUSCS) with 24 species.
#'
#' Created with purely size-based predation, i.e., no species-specific
#' interactions. Set up with three fishing gears targeting small, medium and
#' large species. Vulnerabilities are represented by changing the clearance rate
#' constant (gamma) between species. Calibrated to efforts
#' \code{effort = c(small = 0.4, medium = 0.3, large = 0.25)}.
#' @examples
#' \dontrun{
#' sim = project(NEUSCS_params, effort = c(small = 0.4, medium = 0.3, large = 0.25))
#' plot(sim)
#' }
#' @format A MizerParams object
#' @source{N.S. Jacobsen, M. Burgess and K.H. Andersen (2017):
#' Efficiency of fisheries is increasing at the ecosystem level.
#' Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171.}
#' @docType data
#' @name NEUSCS_params
#' @family example parameter objects
NULL

# North Sea 10 species ----
#' Example MizerParams object for the North Sea with 10 species.
#'
#' Created with purely size-based predation, i.e., no species-specific
#' interactions. Set up with three fishing gears targeting small, medium and
#' large species. Vulnerabilities are represented by changing the clearance rate
#' constant (gamma) between species. Calibrated to efforts
#' \code{effort = c(small = 0.6, medium = 0.6, large = 1.25)}.
#' @examples
#' \dontrun{
#' sim = project(NorthSea_params, effort = c(small = 0.6, medium = 0.6, large = 1.25))
#' plot(sim)
#' }
#' @format A MizerParams object
#' @source{N.S. Jacobsen, M. Burgess and K.H. Andersen (2017):
#' Efficiency of fisheries is increasing at the ecosystem level.
#' Fish and Fisheries 18(2) 199- 211. doi:10.1111/faf.12171.}
#' @docType data
#' @name NorthSea_params
#' @family example parameter objects
NULL

44 changes: 44 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# mizerExamples

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/mizerExamples)](https://CRAN.R-project.org/package=mizerExamples)
<!-- badges: end -->

The goal of mizerExamples is to provide mizer users a way to share their
models.

If you have a model to contribute, just email [email protected].

## Installation

You can install the current version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("sizespectrum/mizerExamples")
```
## Example

```{r example}
library(mizer)
library(mizerExamples)
data("Benguela_params")
plot(Benguela_params)
```

39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# mizerExamples
A crowd-sourced repository of mizer size-spectrum models for various ecosystems

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![CRAN
status](https://www.r-pkg.org/badges/version/mizerExamples)](https://CRAN.R-project.org/package=mizerExamples)
<!-- badges: end -->

The goal of mizerExamples is to provide mizer users a way to share their
models.

If you have a model to contribute, just email
<[email protected]>.

## Installation

You can install the current version from [GitHub](https://github.com/)
with:

``` r
# install.packages("devtools")
devtools::install_github("sizespectrum/mizerExamples")
```

## Example

``` r
library(mizer)
library(mizerExamples)
data("Benguela_params")
plot(Benguela_params)
```

<img src="man/figures/README-example-1.png" width="100%" />
10 changes: 10 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Test environments
* local OS X install, R 3.6.3
* ubuntu 14.04 (on travis-ci), R 3.6.3
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
Binary file added data/Baltic_params.RData
Binary file not shown.
Binary file added data/Barents_params.RData
Binary file not shown.
Binary file added data/Benguela_params.RData
Binary file not shown.
Binary file added data/NEUSCS_params.RData
Binary file not shown.
Binary file added data/NorthSea_params.RData
Binary file not shown.
135 changes: 135 additions & 0 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32f48c9

Please sign in to comment.