Skip to contents

Get the beetles development of specific generations. A value of -1 implies that the generation is not present yet.

Usage

get_development_rst(pheno, generation, dates = prop_dates(pheno))

get_development_df(
  pheno,
  stations = prop_stations(pheno),
  generation = prop_hatched_generations(pheno),
  dates = prop_dates(pheno)
)

Arguments

pheno

A phenology (see phenology())

generation

Generation of interest. For sister broods, 0.5 should be added. get_development_df() allows multiple generations here.

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

  • get_development_rst(): A multi-layer SpatRaster.

  • get_development_df(): A data frame which contains a field for each generation (gen_1, gen_1.5, gen_2, gen_2.5, ...) requested.

Examples

# \donttest{
# calculate station-based phenology
p <- phenology('phenips-clim', barrks_data('stations'), .quiet = TRUE)

# print the development data frame of station 'Freiburg'
df <- get_development_df(p, 'Freiburg')
df[,4:ncol(df)] <- round(df[,4:ncol(df)], 3) # round results
df
#>      station       date doy  gen_1 gen_1.5 gen_2 gen_2.5 gen_3 gen_3.5
#> 1   Freiburg 2011-01-01   1 -1.000      -1    -1      -1    -1      -1
#> 2   Freiburg 2011-01-02   2 -1.000      -1    -1      -1    -1      -1
#> 3   Freiburg 2011-01-03   3 -1.000      -1    -1      -1    -1      -1
#> 4   Freiburg 2011-01-04   4 -1.000      -1    -1      -1    -1      -1
#> 5   Freiburg 2011-01-05   5 -1.000      -1    -1      -1    -1      -1
#> 6   Freiburg 2011-01-06   6 -1.000      -1    -1      -1    -1      -1
#> 7   Freiburg 2011-01-07   7 -1.000      -1    -1      -1    -1      -1
#> 8   Freiburg 2011-01-08   8 -1.000      -1    -1      -1    -1      -1
#> 9   Freiburg 2011-01-09   9 -1.000      -1    -1      -1    -1      -1
#> 10  Freiburg 2011-01-10  10 -1.000      -1    -1      -1    -1      -1
#> 11  Freiburg 2011-01-11  11 -1.000      -1    -1      -1    -1      -1
#> 12  Freiburg 2011-01-12  12 -1.000      -1    -1      -1    -1      -1
#> 13  Freiburg 2011-01-13  13 -1.000      -1    -1      -1    -1      -1
#> 14  Freiburg 2011-01-14  14 -1.000      -1    -1      -1    -1      -1
#> 15  Freiburg 2011-01-15  15 -1.000      -1    -1      -1    -1      -1
#> 16  Freiburg 2011-01-16  16 -1.000      -1    -1      -1    -1      -1
#> 17  Freiburg 2011-01-17  17 -1.000      -1    -1      -1    -1      -1
#> 18  Freiburg 2011-01-18  18 -1.000      -1    -1      -1    -1      -1
#> 19  Freiburg 2011-01-19  19 -1.000      -1    -1      -1    -1      -1
#> 20  Freiburg 2011-01-20  20 -1.000      -1    -1      -1    -1      -1
#> 21  Freiburg 2011-01-21  21 -1.000      -1    -1      -1    -1      -1
#> 22  Freiburg 2011-01-22  22 -1.000      -1    -1      -1    -1      -1
#> 23  Freiburg 2011-01-23  23 -1.000      -1    -1      -1    -1      -1
#> 24  Freiburg 2011-01-24  24 -1.000      -1    -1      -1    -1      -1
#> 25  Freiburg 2011-01-25  25 -1.000      -1    -1      -1    -1      -1
#> 26  Freiburg 2011-01-26  26 -1.000      -1    -1      -1    -1      -1
#> 27  Freiburg 2011-01-27  27 -1.000      -1    -1      -1    -1      -1
#> 28  Freiburg 2011-01-28  28 -1.000      -1    -1      -1    -1      -1
#> 29  Freiburg 2011-01-29  29 -1.000      -1    -1      -1    -1      -1
#> 30  Freiburg 2011-01-30  30 -1.000      -1    -1      -1    -1      -1
#> 31  Freiburg 2011-01-31  31 -1.000      -1    -1      -1    -1      -1
#> 32  Freiburg 2011-02-01  32 -1.000      -1    -1      -1    -1      -1
#> 33  Freiburg 2011-02-02  33 -1.000      -1    -1      -1    -1      -1
#> 34  Freiburg 2011-02-03  34 -1.000      -1    -1      -1    -1      -1
#> 35  Freiburg 2011-02-04  35 -1.000      -1    -1      -1    -1      -1
#> 36  Freiburg 2011-02-05  36 -1.000      -1    -1      -1    -1      -1
#> 37  Freiburg 2011-02-06  37 -1.000      -1    -1      -1    -1      -1
#> 38  Freiburg 2011-02-07  38 -1.000      -1    -1      -1    -1      -1
#> 39  Freiburg 2011-02-08  39 -1.000      -1    -1      -1    -1      -1
#> 40  Freiburg 2011-02-09  40 -1.000      -1    -1      -1    -1      -1
#> 41  Freiburg 2011-02-10  41 -1.000      -1    -1      -1    -1      -1
#> 42  Freiburg 2011-02-11  42 -1.000      -1    -1      -1    -1      -1
#> 43  Freiburg 2011-02-12  43 -1.000      -1    -1      -1    -1      -1
#> 44  Freiburg 2011-02-13  44 -1.000      -1    -1      -1    -1      -1
#> 45  Freiburg 2011-02-14  45 -1.000      -1    -1      -1    -1      -1
#> 46  Freiburg 2011-02-15  46 -1.000      -1    -1      -1    -1      -1
#> 47  Freiburg 2011-02-16  47 -1.000      -1    -1      -1    -1      -1
#> 48  Freiburg 2011-02-17  48 -1.000      -1    -1      -1    -1      -1
#> 49  Freiburg 2011-02-18  49 -1.000      -1    -1      -1    -1      -1
#> 50  Freiburg 2011-02-19  50 -1.000      -1    -1      -1    -1      -1
#> 51  Freiburg 2011-02-20  51 -1.000      -1    -1      -1    -1      -1
#> 52  Freiburg 2011-02-21  52 -1.000      -1    -1      -1    -1      -1
#> 53  Freiburg 2011-02-22  53 -1.000      -1    -1      -1    -1      -1
#> 54  Freiburg 2011-02-23  54 -1.000      -1    -1      -1    -1      -1
#> 55  Freiburg 2011-02-24  55 -1.000      -1    -1      -1    -1      -1
#> 56  Freiburg 2011-02-25  56 -1.000      -1    -1      -1    -1      -1
#> 57  Freiburg 2011-02-26  57 -1.000      -1    -1      -1    -1      -1
#> 58  Freiburg 2011-02-27  58 -1.000      -1    -1      -1    -1      -1
#> 59  Freiburg 2011-02-28  59 -1.000      -1    -1      -1    -1      -1
#> 60  Freiburg 2011-03-01  60 -1.000      -1    -1      -1    -1      -1
#> 61  Freiburg 2011-03-02  61 -1.000      -1    -1      -1    -1      -1
#> 62  Freiburg 2011-03-03  62 -1.000      -1    -1      -1    -1      -1
#> 63  Freiburg 2011-03-04  63 -1.000      -1    -1      -1    -1      -1
#> 64  Freiburg 2011-03-05  64 -1.000      -1    -1      -1    -1      -1
#> 65  Freiburg 2011-03-06  65 -1.000      -1    -1      -1    -1      -1
#> 66  Freiburg 2011-03-07  66 -1.000      -1    -1      -1    -1      -1
#> 67  Freiburg 2011-03-08  67 -1.000      -1    -1      -1    -1      -1
#> 68  Freiburg 2011-03-09  68 -1.000      -1    -1      -1    -1      -1
#> 69  Freiburg 2011-03-10  69 -1.000      -1    -1      -1    -1      -1
#> 70  Freiburg 2011-03-11  70 -1.000      -1    -1      -1    -1      -1
#> 71  Freiburg 2011-03-12  71 -1.000      -1    -1      -1    -1      -1
#> 72  Freiburg 2011-03-13  72 -1.000      -1    -1      -1    -1      -1
#> 73  Freiburg 2011-03-14  73 -1.000      -1    -1      -1    -1      -1
#> 74  Freiburg 2011-03-15  74 -1.000      -1    -1      -1    -1      -1
#> 75  Freiburg 2011-03-16  75 -1.000      -1    -1      -1    -1      -1
#> 76  Freiburg 2011-03-17  76 -1.000      -1    -1      -1    -1      -1
#> 77  Freiburg 2011-03-18  77 -1.000      -1    -1      -1    -1      -1
#> 78  Freiburg 2011-03-19  78 -1.000      -1    -1      -1    -1      -1
#> 79  Freiburg 2011-03-20  79 -1.000      -1    -1      -1    -1      -1
#> 80  Freiburg 2011-03-21  80 -1.000      -1    -1      -1    -1      -1
#> 81  Freiburg 2011-03-22  81 -1.000      -1    -1      -1    -1      -1
#> 82  Freiburg 2011-03-23  82 -1.000      -1    -1      -1    -1      -1
#> 83  Freiburg 2011-03-24  83 -1.000      -1    -1      -1    -1      -1
#> 84  Freiburg 2011-03-25  84  0.000      -1    -1      -1    -1      -1
#> 85  Freiburg 2011-03-26  85  0.000      -1    -1      -1    -1      -1
#> 86  Freiburg 2011-03-27  86  0.000      -1    -1      -1    -1      -1
#> 87  Freiburg 2011-03-28  87  0.000      -1    -1      -1    -1      -1
#> 88  Freiburg 2011-03-29  88  0.000      -1    -1      -1    -1      -1
#> 89  Freiburg 2011-03-30  89  0.000      -1    -1      -1    -1      -1
#> 90  Freiburg 2011-03-31  90  0.000      -1    -1      -1    -1      -1
#> 91  Freiburg 2011-04-01  91  0.002      -1    -1      -1    -1      -1
#> 92  Freiburg 2011-04-02  92  0.012      -1    -1      -1    -1      -1
#> 93  Freiburg 2011-04-03  93  0.032      -1    -1      -1    -1      -1
#> 94  Freiburg 2011-04-04  94  0.045      -1    -1      -1    -1      -1
#> 95  Freiburg 2011-04-05  95  0.060      -1    -1      -1    -1      -1
#> 96  Freiburg 2011-04-06  96  0.079      -1    -1      -1    -1      -1
#> 97  Freiburg 2011-04-07  97  0.090      -1    -1      -1    -1      -1
#> 98  Freiburg 2011-04-08  98  0.107      -1    -1      -1    -1      -1
#> 99  Freiburg 2011-04-09  99  0.121      -1    -1      -1    -1      -1
#> 100 Freiburg 2011-04-10 100  0.133      -1    -1      -1    -1      -1
#> 101 Freiburg 2011-04-11 101  0.144      -1    -1      -1    -1      -1
#> 102 Freiburg 2011-04-12 102  0.155      -1    -1      -1    -1      -1
#> 103 Freiburg 2011-04-13 103  0.165      -1    -1      -1    -1      -1
#> 104 Freiburg 2011-04-14 104  0.174      -1    -1      -1    -1      -1
#> 105 Freiburg 2011-04-15 105  0.185      -1    -1      -1    -1      -1
#> 106 Freiburg 2011-04-16 106  0.196      -1    -1      -1    -1      -1
#> 107 Freiburg 2011-04-17 107  0.207       0    -1      -1    -1      -1
#> 108 Freiburg 2011-04-18 108  0.216       0    -1      -1    -1      -1
#> 109 Freiburg 2011-04-19 109  0.228       0    -1      -1    -1      -1
#> 110 Freiburg 2011-04-20 110  0.240       0    -1      -1    -1      -1
#> 111 Freiburg 2011-04-21 111  0.253       0    -1      -1    -1      -1
#>  [ reached 'max' / getOption("max.print") -- omitted 254 rows ]
# }