Skip to contents

Get the number of individuals of a generation that are in a specific development stage.

Usage

bso_get_individuals_rst(
  pheno,
  generation,
  stage = "all",
  dates = prop_dates(pheno)
)

bso_get_individuals_df(
  pheno,
  generation,
  stations = prop_stations(pheno),
  stage = "all",
  dates = prop_dates(pheno)
)

Arguments

pheno

A BSO phenology (see bso_phenology())

generation

Generation of interest. For sister broods, 0.5 should be added.

stage

If it is a numeric, the individuals of the slots specified will be retrieved. Otherwise it could be one of the following values: all, egg, larva, pupa, white (egg + larva + pupa), maturation, preflight, reproduction, brown (maturation + preflight + reproduction)

dates

Select dates that should be present in the output.

stations

Pass a character vector to choose stations assigned to pheno by their names, or pass different stations. See stations_create() for details.

Value

  • bso_get_individuals_rst(): a multi-layer SpatRaster.

  • bso_get_individuals(): a data frame.

Examples

# \donttest{
# This may take a few minutes...

# calculate phenology
p <- bso_phenology('bso', barrks_data('stations'), .quiet = TRUE)

# get the number of individuals of the hibernating generation that are waiting to fly
bso_get_individuals_df(p, 0, 'Freiburg', stage = 'preflight')
#>      station       date doy individuals
#> 1   Freiburg 2011-01-01   1           0
#> 2   Freiburg 2011-01-02   2           0
#> 3   Freiburg 2011-01-03   3           0
#> 4   Freiburg 2011-01-04   4           0
#> 5   Freiburg 2011-01-05   5           0
#> 6   Freiburg 2011-01-06   6           0
#> 7   Freiburg 2011-01-07   7           0
#> 8   Freiburg 2011-01-08   8           0
#> 9   Freiburg 2011-01-09   9           0
#> 10  Freiburg 2011-01-10  10           0
#> 11  Freiburg 2011-01-11  11           0
#> 12  Freiburg 2011-01-12  12           0
#> 13  Freiburg 2011-01-13  13           0
#> 14  Freiburg 2011-01-14  14           0
#> 15  Freiburg 2011-01-15  15           0
#> 16  Freiburg 2011-01-16  16           0
#> 17  Freiburg 2011-01-17  17           0
#> 18  Freiburg 2011-01-18  18           0
#> 19  Freiburg 2011-01-19  19           0
#> 20  Freiburg 2011-01-20  20           0
#> 21  Freiburg 2011-01-21  21           0
#> 22  Freiburg 2011-01-22  22           0
#> 23  Freiburg 2011-01-23  23           0
#> 24  Freiburg 2011-01-24  24           0
#> 25  Freiburg 2011-01-25  25           0
#> 26  Freiburg 2011-01-26  26           0
#> 27  Freiburg 2011-01-27  27           0
#> 28  Freiburg 2011-01-28  28           0
#> 29  Freiburg 2011-01-29  29           0
#> 30  Freiburg 2011-01-30  30           0
#> 31  Freiburg 2011-01-31  31           0
#> 32  Freiburg 2011-02-01  32           0
#> 33  Freiburg 2011-02-02  33           0
#> 34  Freiburg 2011-02-03  34           0
#> 35  Freiburg 2011-02-04  35           0
#> 36  Freiburg 2011-02-05  36           0
#> 37  Freiburg 2011-02-06  37           0
#> 38  Freiburg 2011-02-07  38           0
#> 39  Freiburg 2011-02-08  39           0
#> 40  Freiburg 2011-02-09  40           0
#> 41  Freiburg 2011-02-10  41           0
#> 42  Freiburg 2011-02-11  42           0
#> 43  Freiburg 2011-02-12  43           0
#> 44  Freiburg 2011-02-13  44           0
#> 45  Freiburg 2011-02-14  45           0
#> 46  Freiburg 2011-02-15  46           0
#> 47  Freiburg 2011-02-16  47           0
#> 48  Freiburg 2011-02-17  48           0
#> 49  Freiburg 2011-02-18  49           0
#> 50  Freiburg 2011-02-19  50           0
#> 51  Freiburg 2011-02-20  51           0
#> 52  Freiburg 2011-02-21  52           0
#> 53  Freiburg 2011-02-22  53           0
#> 54  Freiburg 2011-02-23  54           0
#> 55  Freiburg 2011-02-24  55           0
#> 56  Freiburg 2011-02-25  56           0
#> 57  Freiburg 2011-02-26  57           0
#> 58  Freiburg 2011-02-27  58           0
#> 59  Freiburg 2011-02-28  59           0
#> 60  Freiburg 2011-03-01  60           0
#> 61  Freiburg 2011-03-02  61           0
#> 62  Freiburg 2011-03-03  62           0
#> 63  Freiburg 2011-03-04  63           0
#> 64  Freiburg 2011-03-05  64           0
#> 65  Freiburg 2011-03-06  65           0
#> 66  Freiburg 2011-03-07  66           0
#> 67  Freiburg 2011-03-08  67           0
#> 68  Freiburg 2011-03-09  68        4545
#> 69  Freiburg 2011-03-10  69      511650
#> 70  Freiburg 2011-03-11  70     3129777
#> 71  Freiburg 2011-03-12  71     7980534
#> 72  Freiburg 2011-03-13  72    17106085
#> 73  Freiburg 2011-03-14  73    31744481
#> 74  Freiburg 2011-03-15  74    53388984
#> 75  Freiburg 2011-03-16  75    84696288
#> 76  Freiburg 2011-03-17  76   121562858
#> 77  Freiburg 2011-03-18  77   156628398
#> 78  Freiburg 2011-03-19  78   184445447
#> 79  Freiburg 2011-03-20  79   203932471
#> 80  Freiburg 2011-03-21  80   223557867
#> 81  Freiburg 2011-03-22  81   246165379
#> 82  Freiburg 2011-03-23  82   269675260
#> 83  Freiburg 2011-03-24  83   296430094
#> 84  Freiburg 2011-03-25  84   326375249
#> 85  Freiburg 2011-03-26  85   372150172
#> 86  Freiburg 2011-03-27  86   428954029
#> 87  Freiburg 2011-03-28  87   481691466
#> 88  Freiburg 2011-03-29  88   521918239
#> 89  Freiburg 2011-03-30  89   561691173
#> 90  Freiburg 2011-03-31  90   608867992
#> 91  Freiburg 2011-04-01  91   640690343
#> 92  Freiburg 2011-04-02  92   647928525
#> 93  Freiburg 2011-04-03  93   646187507
#> 94  Freiburg 2011-04-04  94   665487388
#> 95  Freiburg 2011-04-05  95   684793640
#> 96  Freiburg 2011-04-06  96   676777558
#> 97  Freiburg 2011-04-07  97   649289641
#> 98  Freiburg 2011-04-08  98   625919245
#> 99  Freiburg 2011-04-09  99   610539078
#> 100 Freiburg 2011-04-10 100   590173031
#> 101 Freiburg 2011-04-11 101   562197959
#> 102 Freiburg 2011-04-12 102   551091284
#> 103 Freiburg 2011-04-13 103   555600333
#> 104 Freiburg 2011-04-14 104   558595296
#> 105 Freiburg 2011-04-15 105   560870895
#> 106 Freiburg 2011-04-16 106   561954025
#> 107 Freiburg 2011-04-17 107   557464477
#> 108 Freiburg 2011-04-18 108   540509359
#> 109 Freiburg 2011-04-19 109   514149123
#> 110 Freiburg 2011-04-20 110   484570006
#> 111 Freiburg 2011-04-21 111   452887543
#> 112 Freiburg 2011-04-22 112   421112594
#> 113 Freiburg 2011-04-23 113   390193629
#> 114 Freiburg 2011-04-24 114   362387718
#> 115 Freiburg 2011-04-25 115   339212045
#> 116 Freiburg 2011-04-26 116   321508346
#> 117 Freiburg 2011-04-27 117   312495380
#> 118 Freiburg 2011-04-28 118   305304859
#> 119 Freiburg 2011-04-29 119   301440428
#> 120 Freiburg 2011-04-30 120   298275473
#> 121 Freiburg 2011-05-01 121   286495566
#> 122 Freiburg 2011-05-02 122   273757434
#> 123 Freiburg 2011-05-03 123   269422388
#> 124 Freiburg 2011-05-04 124   269463584
#> 125 Freiburg 2011-05-05 125   264241453
#> 126 Freiburg 2011-05-06 126   249082473
#> 127 Freiburg 2011-05-07 127   228233975
#> 128 Freiburg 2011-05-08 128   207390909
#> 129 Freiburg 2011-05-09 129   187719043
#> 130 Freiburg 2011-05-10 130   169625924
#> 131 Freiburg 2011-05-11 131   152877217
#> 132 Freiburg 2011-05-12 132   141390116
#> 133 Freiburg 2011-05-13 133   133573522
#> 134 Freiburg 2011-05-14 134   126460435
#> 135 Freiburg 2011-05-15 135   123684244
#> 136 Freiburg 2011-05-16 136   123074111
#> 137 Freiburg 2011-05-17 137   118595187
#> 138 Freiburg 2011-05-18 138   109690531
#> 139 Freiburg 2011-05-19 139    99201647
#> 140 Freiburg 2011-05-20 140    89532245
#> 141 Freiburg 2011-05-21 141    81277986
#> 142 Freiburg 2011-05-22 142    73538829
#> 143 Freiburg 2011-05-23 143    66583562
#> 144 Freiburg 2011-05-24 144    60654298
#> 145 Freiburg 2011-05-25 145    55256747
#> 146 Freiburg 2011-05-26 146    49941884
#> 147 Freiburg 2011-05-27 147    46608833
#> 148 Freiburg 2011-05-28 148    44798271
#> 149 Freiburg 2011-05-29 149    41615810
#> 150 Freiburg 2011-05-30 150    37504912
#> 151 Freiburg 2011-05-31 151    33962639
#> 152 Freiburg 2011-06-01 152    32734375
#> 153 Freiburg 2011-06-02 153    31292896
#> 154 Freiburg 2011-06-03 154    28308066
#> 155 Freiburg 2011-06-04 155    25283508
#> 156 Freiburg 2011-06-05 156    22622733
#> 157 Freiburg 2011-06-06 157    20281359
#> 158 Freiburg 2011-06-07 158    18372391
#> 159 Freiburg 2011-06-08 159    17439561
#> 160 Freiburg 2011-06-09 160    17144259
#> 161 Freiburg 2011-06-10 161    16343474
#> 162 Freiburg 2011-06-11 162    15431583
#> 163 Freiburg 2011-06-12 163    14463605
#> 164 Freiburg 2011-06-13 164    13290130
#> 165 Freiburg 2011-06-14 165    12149545
#> 166 Freiburg 2011-06-15 166    10938433
#> 167 Freiburg 2011-06-16 167     9753795
#> 168 Freiburg 2011-06-17 168     8746556
#> 169 Freiburg 2011-06-18 169     8156766
#> 170 Freiburg 2011-06-19 170     7780537
#> 171 Freiburg 2011-06-20 171     7250937
#> 172 Freiburg 2011-06-21 172     6514620
#> 173 Freiburg 2011-06-22 173     5717744
#> 174 Freiburg 2011-06-23 174     5163466
#> 175 Freiburg 2011-06-24 175     4822319
#> 176 Freiburg 2011-06-25 176     4508948
#> 177 Freiburg 2011-06-26 177     4095721
#> 178 Freiburg 2011-06-27 178     3714592
#> 179 Freiburg 2011-06-28 179     3389059
#> 180 Freiburg 2011-06-29 180     3066589
#> 181 Freiburg 2011-06-30 181     2828500
#> 182 Freiburg 2011-07-01 182     2686014
#> 183 Freiburg 2011-07-02 183     2573436
#> 184 Freiburg 2011-07-03 184     2424203
#> 185 Freiburg 2011-07-04 185     2224028
#> 186 Freiburg 2011-07-05 186     1998831
#> 187 Freiburg 2011-07-06 187     1780695
#> 188 Freiburg 2011-07-07 188     1587060
#> 189 Freiburg 2011-07-08 189     1434656
#> 190 Freiburg 2011-07-09 190     1293139
#> 191 Freiburg 2011-07-10 191     1166067
#> 192 Freiburg 2011-07-11 192     1059289
#> 193 Freiburg 2011-07-12 193      942601
#> 194 Freiburg 2011-07-13 194      840087
#> 195 Freiburg 2011-07-14 195      783631
#> 196 Freiburg 2011-07-15 196      740537
#> 197 Freiburg 2011-07-16 197      682581
#> 198 Freiburg 2011-07-17 198      616615
#> 199 Freiburg 2011-07-18 199      570840
#> 200 Freiburg 2011-07-19 200      538893
#> 201 Freiburg 2011-07-20 201      506403
#> 202 Freiburg 2011-07-21 202      476256
#> 203 Freiburg 2011-07-22 203      441617
#> 204 Freiburg 2011-07-23 204      414090
#> 205 Freiburg 2011-07-24 205      403892
#> 206 Freiburg 2011-07-25 206      387630
#> 207 Freiburg 2011-07-26 207      357778
#> 208 Freiburg 2011-07-27 208      326114
#> 209 Freiburg 2011-07-28 209      298653
#> 210 Freiburg 2011-07-29 210      274368
#> 211 Freiburg 2011-07-30 211      253942
#> 212 Freiburg 2011-07-31 212      239479
#> 213 Freiburg 2011-08-01 213      223651
#> 214 Freiburg 2011-08-02 214      202751
#> 215 Freiburg 2011-08-03 215      179769
#> 216 Freiburg 2011-08-04 216      157819
#> 217 Freiburg 2011-08-05 217      139859
#> 218 Freiburg 2011-08-06 218      125346
#> 219 Freiburg 2011-08-07 219      113730
#> 220 Freiburg 2011-08-08 220      105887
#> 221 Freiburg 2011-08-09 221      100075
#> 222 Freiburg 2011-08-10 222       95659
#> 223 Freiburg 2011-08-11 223       89398
#> 224 Freiburg 2011-08-12 224       80950
#> 225 Freiburg 2011-08-13 225       72628
#> 226 Freiburg 2011-08-14 226       65165
#> 227 Freiburg 2011-08-15 227       58512
#> 228 Freiburg 2011-08-16 228       53465
#> 229 Freiburg 2011-08-17 229       48245
#> 230 Freiburg 2011-08-18 230       42513
#> 231 Freiburg 2011-08-19 231       37364
#> 232 Freiburg 2011-08-20 232       33084
#> 233 Freiburg 2011-08-21 233       29392
#> 234 Freiburg 2011-08-22 234       26858
#> 235 Freiburg 2011-08-23 235       24944
#> 236 Freiburg 2011-08-24 236       22473
#> 237 Freiburg 2011-08-25 237       19864
#> 238 Freiburg 2011-08-26 238       17691
#> 239 Freiburg 2011-08-27 239       16437
#> 240 Freiburg 2011-08-28 240       15697
#> 241 Freiburg 2011-08-29 241       14668
#> 242 Freiburg 2011-08-30 242       13777
#> 243 Freiburg 2011-08-31 243       12865
#> 244 Freiburg 2011-09-01 244       11716
#> 245 Freiburg 2011-09-02 245       10458
#> 246 Freiburg 2011-09-03 246        9315
#> 247 Freiburg 2011-09-04 247        8267
#> 248 Freiburg 2011-09-05 248        7631
#> 249 Freiburg 2011-09-06 249        7095
#> 250 Freiburg 2011-09-07 250        6565
#>  [ reached 'max' / getOption("max.print") -- omitted 115 rows ]
# }