-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
94 lines (73 loc) · 1.79 KB
/
README.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
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%"
)
```
# sizeTrophicInteractions
<!-- badges: start -->
[![R-CMD-check](https://github.com/alaindanet/SizeTrophicInteractions/workflows/R-CMD-check/badge.svg)](https://github.com/alaindanet/SizeTrophicInteractions/actions)
<!-- badges: end -->
The goal of sizeTrophicInteractions is to ...
## Installation
You can install sizeTrophicInteractions with:
``` r
devtools::install_github("alaindanet/sizeTrophicInteractions")
```
## Example
```{r example}
library(sizeTrophicInteractions)
```
### Generate individual size
#### With Pokémon
```{r}
lot <- tibble::tibble(
id = seq(1:4),
species = rep(c("Pikachu", "Salameche"), each = 2),
type = c("I", "N", "S/L", "G"),
min = c(rep(NA, 3), 1),
max = c(rep(NA, 3), 2),
nb = c(5, 1, 50, 10)
)
measure <- tibble::tibble(
id = c(rep(1, 5), 2, rep(3, 30)),
size = c(seq(10, 15), rnorm(30, 10, 2))
)
get_size_from_lot(
lot = lot,
id_var = id,
type_var = type,
nb_var = nb,
min_var = min,
max_var = max,
species = species,
measure = measure,
measure_id_var = id,
size_var = size)
```
### With OFB data
```{r}
# sample of OFB data
data(ind_measure_testing)
data(lot_testing)
```
```{r}
size <- get_size_from_lot(
lot = lot_testing,
id_var = lop_id,
type_var = type_lot,
nb_var = lop_effectif,
min_var = lop_longueur_specimens_taille_mini,
max_var = lop_longueur_specimens_taille_maxi,
species = species,
measure = ind_measure_testing,
measure_id_var = mei_lop_id,
size_var = mei_taille)
size
```