Function extract() extracts daily or subdaily output and returns it as a tidy data frame.

extract(
  x,
  level = "forest",
  output = NULL,
  vars = NULL,
  dates = NULL,
  subdaily = FALSE
)

Arguments

x

An object returned by simulation functions spwb, pwb or growth.

level

Level of simulation output, either "forest" (stand-level results), "soillayer" (soil layer-level results), "cohort" (cohort-level results), "sunlitleaf" or "shadeleaf" (leaf-level results)

output

Section of the model output to be explored. See details.

vars

Variables to be extracted (by default, all of them).

dates

A date vector indicating the subset of simulated days for which output is desired.

subdaily

A flag to indicate that subdaily values are desired (see details).

Value

Function extract() returns a data frame:

  • If level = "forest", columns are "date" and variable names.

  • If level = "soillayer", columns are "date", "soillayer" and variable names.

  • If level = "cohort", level = "sunlitleaf" or level = "shadeleaf", columns are "date", "cohorts", "species" and variable names.

  • If subdaily = TRUE, columns are "datetime", "cohorts", "species" and variable names.

Details

When subdaily = FALSE, parameter output is used to restrict the section in x where variables are located. For example output = "Plants" will correspond to variables "LAI", "LAIlive", "Transpiration", "StemPLC",... as returned by a call names(x$Plants).

Option subdaily = TRUE only works when simulations have been carried using control option 'subdailyResults = TRUE' (see defaultControl). When using subdaily = TRUE, parameter output is not taken into account, and options for parameter vars are the following:

  • Variables for level = "forest" or level = "soillayer": Not allowed. An error is raised.

  • Variables for level = "cohort": "E","Ag","An","dEdP","RootPsi","StemPsi","LeafPsi","StemPLC","StemRWC","LeafRWC","StemSympRWC","LeafSympRWC","PWB".

  • Variables for level = "shadeleaf" and level="sunlitleaf": "Abs_SWR","Abs_PAR","Net_LWR","E","Ag","An","Ci","Gsw","VPD","Temp","Psi","iWUE".

See also

Author

Miquel De Cáceres Ainsa, CREAF

Examples

#Load example daily meteorological data
data(examplemeteo)

#Load example plot plant data
data(exampleforest)

#Default species parameterization
data(SpParamsMED)

#Define soil with default soil params (4 layers)
examplesoil = defaultSoilParams(4)

#Initialize control parameters
control = defaultControl("Granier")

#Initialize input
x = forest2spwbInput(exampleforest,examplesoil, SpParamsMED, control)

#Call simulation function (ten days)
S1<-spwb(x, examplemeteo[1:10, ], latitude = 41.82592, elevation = 100)
#> Initial plant water content (mm): 7.05859
#> Initial soil water content (mm): 290.875
#> Initial snowpack content (mm): 0
#> Performing daily simulations
#> 
#>  [Year 2001]:
#> 
#> Final plant water content (mm): 7.05974
#> Final soil water content (mm): 318.401
#> Final snowpack content (mm): 0
#> Change in plant water content (mm): 0.00114939
#> Plant water balance result (mm): 0.00114939
#> Change in soil water content (mm): 27.5261
#> Soil water balance result (mm): 27.5261
#> Change in snowpack water content (mm): 0
#> Snowpack water balance result (mm): 0
#> Water balance components:
#>   Precipitation (mm) 39 Rain (mm) 34 Snow (mm) 5
#>   Interception (mm) 9 Net rainfall (mm) 25
#>   Infiltration (mm) 30 Infiltration excess (mm) 0 Saturation excess (mm) 0 Capillarity rise (mm) 0
#>   Soil evaporation (mm) 1  Herbaceous transpiration (mm) 0 Woody plant transpiration (mm) 2
#>   Plant extraction from soil (mm) 2  Plant water balance (mm) 0 Hydraulic redistribution (mm) 0
#>   Runoff (mm) 0 Deep drainage (mm) 0

#Extracts daily forest-level output as a data frame
extract(S1, level = "forest")
#>          date       PET Precipitation      Rain   Snow    NetRain Snowmelt
#> 1  2001-01-01 0.8828475      4.869109  4.869109 0.0000  3.4241795   0.0000
#> 2  2001-01-02 1.6375337      2.498292  2.498292 0.0000  1.0717469   0.0000
#> 3  2001-01-03 1.3017026      0.000000  0.000000 0.0000  0.0000000   0.0000
#> 4  2001-01-04 0.5690790      5.796973  5.796973 0.0000  4.3625616   0.0000
#> 5  2001-01-05 1.6760567      1.884401  1.884401 0.0000  0.7539027   0.0000
#> 6  2001-01-06 1.2077028     13.359801 13.359801 0.0000 11.7240275   0.0000
#> 7  2001-01-07 0.6368075      5.377400  0.000000 5.3774  0.0000000   0.0000
#> 8  2001-01-08 0.8318207      0.000000  0.000000 0.0000  0.0000000   0.0000
#> 9  2001-01-09 1.9823797      0.000000  0.000000 0.0000  0.0000000   0.0000
#> 10 2001-01-10 0.8286873      5.117768  5.117768 0.0000  3.6727363   5.3774
#>    Infiltration InfiltrationExcess SaturationExcess Runoff DeepDrainage
#> 1     3.4241795                  0                0      0  0.005456802
#> 2     1.0717469                  0                0      0  0.005228854
#> 3     0.0000000                  0                0      0  0.005039513
#> 4     4.3625616                  0                0      0  0.005229715
#> 5     0.7539027                  0                0      0  0.005915121
#> 6    11.7240275                  0                0      0  0.005944043
#> 7     0.0000000                  0                0      0  0.000000000
#> 8     0.0000000                  0                0      0  0.000000000
#> 9     0.0000000                  0                0      0  0.000000000
#> 10    9.0501360                  0                0      0  0.005527667
#>    CapillarityRise Evapotranspiration Interception SoilEvaporation
#> 1     4.253918e-05          2.0551277     1.444929      0.44789475
#> 2     1.719450e-05          1.7952884     1.426545      0.06745555
#> 3     0.000000e+00          0.2965751     0.000000      0.05704075
#> 4     3.085695e-04          1.6073455     1.434411      0.06822810
#> 5     0.000000e+00          1.4658734     1.130499      0.02667534
#> 6     4.253627e-03          1.8845405     1.635773      0.02632159
#> 7     1.172680e-09          0.1175162     0.000000      0.00000000
#> 8     2.623665e-09          0.1535012     0.000000      0.00000000
#> 9     3.583398e-08          0.3658126     0.000000      0.00000000
#> 10    6.010913e-03          1.6083235     1.445031      0.01038145
#>    HerbTranspiration PlantExtraction Transpiration HydraulicRedistribution
#> 1        0.011023432      0.15128020    0.15128020             0.000000000
#> 2        0.020448148      0.28083997    0.28083997             0.017671365
#> 3        0.016254769      0.22327958    0.22327958             0.014378650
#> 4        0.007106176      0.09759986    0.09759986             0.006500081
#> 5        0.020930994      0.28776825    0.28776825             0.019358622
#> 6        0.015082103      0.20736367    0.20736367             0.014250294
#> 7        0.007953577      0.10956266    0.10956266             0.008234682
#> 8        0.010389236      0.14311195    0.14311195             0.010758359
#> 9        0.024759403      0.34105319    0.34105319             0.025645425
#> 10       0.010350054      0.14256061    0.14256061             0.010727564
#>         LAI   LAIherb  LAIlive LAIexpanded LAIdead       Cm LgroundPAR
#> 1  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 2  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 3  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 4  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 5  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 6  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 7  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 8  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 9  1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#> 10 1.758585 0.1736369 1.584948    1.584948       0 1.390485   40.00754
#>    LgroundSWR    SWE
#> 1    50.73297 0.0000
#> 2    50.73297 0.0000
#> 3    50.73297 0.0000
#> 4    50.73297 0.0000
#> 5    50.73297 0.0000
#> 6    50.73297 0.0000
#> 7    50.73297 5.3774
#> 8    50.73297 5.3774
#> 9    50.73297 5.3774
#> 10   50.73297 0.0000

#Extracts daily soil layer-level output as a data frame
extract(S1, level = "soillayer")
#>          date soillayer       SWC      RWC      REW        ML          Psi
#> 1  2001-01-01         1 0.3110807 1.026687 1.040023  69.99316 -0.029074307
#> 2  2001-01-02         1 0.3126076 1.031726 1.047580  70.33671 -0.028384945
#> 3  2001-01-03         1 0.3109857 1.026373 1.039553  69.97179 -0.029117701
#> 4  2001-01-04         1 0.3237620 1.068540 1.102791  72.84645 -0.023785264
#> 5  2001-01-05         1 0.3240427 1.069466 1.104180  72.90961 -0.023678611
#> 6  2001-01-06         1 0.3591947 1.185482 1.278171  80.81880 -0.012967421
#> 7  2001-01-07         1 0.3586941 1.183829 1.275693  80.70616 -0.013090468
#> 8  2001-01-08         1 0.3580408 1.181673 1.272459  80.55917 -0.013252052
#> 9  2001-01-09         1 0.3564859 1.176542 1.264763  80.20933 -0.013641341
#> 10 2001-01-10         1 0.3811508 1.257945 1.386846  85.75893 -0.008140758
#> 11 2001-01-01         2 0.3053086 1.007637 1.011453 117.54381 -0.031827005
#> 12 2001-01-02         2 0.3059970 1.009909 1.014860 117.80885 -0.031485975
#> 13 2001-01-03         2 0.3059817 1.009858 1.014785 117.80297 -0.031493494
#> 14 2001-01-04         2 0.3090575 1.020009 1.030009 118.98714 -0.030012127
#> 15 2001-01-05         2 0.3097009 1.022133 1.033193 119.23483 -0.029710839
#> 16 2001-01-06         2 0.3182848 1.050463 1.075681 122.53963 -0.025952457
#> 17 2001-01-07         2 0.3182511 1.050352 1.075514 122.52666 -0.025966310
#> 18 2001-01-08         2 0.3182067 1.050205 1.075294 122.50958 -0.025984572
#> 19 2001-01-09         2 0.3180997 1.049852 1.074765 122.46840 -0.026028633
#> 20 2001-01-10         2 0.3261421 1.076395 1.114572 125.56470 -0.022893863
#> 21 2001-01-01         3 0.3033022 1.001015 1.001522  75.82556 -0.032841694
#> 22 2001-01-02         3 0.3035297 1.001766 1.002648  75.88243 -0.032725071
#> 23 2001-01-03         3 0.3036912 1.002299 1.003447  75.92280 -0.032642542
#> 24 2001-01-04         3 0.3040926 1.003623 1.005434  76.02314 -0.032438274
#> 25 2001-01-05         3 0.3043593 1.004504 1.006754  76.08982 -0.032303216
#> 26 2001-01-06         3 0.3052597 1.007475 1.011211  76.31493 -0.031851352
#> 27 2001-01-07         3 0.3052741 1.007523 1.011282  76.31851 -0.031844215
#> 28 2001-01-08         3 0.3052928 1.007584 1.011375  76.32319 -0.031834892
#> 29 2001-01-09         3 0.3053374 1.007732 1.011595  76.33435 -0.031812678
#> 30 2001-01-10         3 0.3061821 1.010520 1.015776  76.54552 -0.031394891
#> 31 2001-01-01         4 0.3032097 1.000710 1.001064  30.32097 -0.032889241
#> 32 2001-01-02         4 0.3035331 1.001777 1.002665  30.35331 -0.032723329
#> 33 2001-01-03         4 0.3038213 1.002728 1.004091  30.38213 -0.032576205
#> 34 2001-01-04         4 0.3040766 1.003571 1.005355  30.40766 -0.032446344
#> 35 2001-01-05         4 0.3044275 1.004729 1.007092  30.44275 -0.032268793
#> 36 2001-01-06         4 0.3047720 1.005866 1.008797  30.47720 -0.032095324
#> 37 2001-01-07         4 0.3048172 1.006015 1.009020  30.48172 -0.032072671
#> 38 2001-01-08         4 0.3048761 1.006209 1.009312  30.48761 -0.032043101
#> 39 2001-01-09         4 0.3050167 1.006673 1.010008  30.50167 -0.031972722
#> 40 2001-01-10         4 0.3053192 1.007672 1.011506  30.53192 -0.031821711
#> 41 2001-01-01   Overall 0.3059203 1.009656 1.014481 293.68351 -0.031556733
#> 42 2001-01-02   Overall 0.3066472 1.012055 1.018078 294.38130 -0.031210743
#> 43 2001-01-03   Overall 0.3063330 1.011018 1.016523 294.07968 -0.031348681
#> 44 2001-01-04   Overall 0.3106921 1.025404 1.038099 298.26439 -0.029438080
#> 45 2001-01-05   Overall 0.3111219 1.026823 1.040227 298.67700 -0.029238587
#> 46 2001-01-06   Overall 0.3230735 1.066268 1.099383 310.15057 -0.025085142
#> 47 2001-01-07   Overall 0.3229511 1.065864 1.098777 310.03306 -0.025115318
#> 48 2001-01-08   Overall 0.3227912 1.065336 1.097986 309.87956 -0.025155005
#> 49 2001-01-09   Overall 0.3224101 1.064078 1.096100 309.51374 -0.025250799
#> 50 2001-01-10   Overall 0.3316678 1.094632 1.141922 318.40107 -0.022579898
#>         PlantExt HydraulicInput
#> 1   0.1101121597    0.000000000
#> 2   0.2400775706    0.000000000
#> 3   0.1916858833    0.000000000
#> 4   0.0831129934    0.000000000
#> 5   0.2561773551    0.000000000
#> 6   0.1843121996    0.000000000
#> 7   0.1053947928    0.000000000
#> 8   0.1375229367    0.000000000
#> 9   0.3272792149    0.000000000
#> 10  0.1363426306    0.000000000
#> 11  0.0364746151    0.000000000
#> 12  0.0584337646    0.000000000
#> 13  0.0459723458    0.000000000
#> 14  0.0209869455    0.000000000
#> 15  0.0509495218    0.000000000
#> 16  0.0373017695    0.000000000
#> 17  0.0124025529    0.000000000
#> 18  0.0163473715    0.000000000
#> 19  0.0394193963    0.000000000
#> 20  0.0169455402    0.000000000
#> 21  0.0037576026    0.000000000
#> 22 -0.0063764669    0.006376467
#> 23 -0.0054591858    0.005459186
#> 24 -0.0025806284    0.002580628
#> 25 -0.0078389453    0.007838945
#> 26 -0.0058596122    0.005859612
#> 27 -0.0036799092    0.003679909
#> 28 -0.0048078547    0.004807855
#> 29 -0.0114615412    0.011461541
#> 30 -0.0047955776    0.004795578
#> 31  0.0009358264    0.000000000
#> 32 -0.0112948983    0.011294898
#> 33 -0.0089194642    0.008919464
#> 34 -0.0039194527    0.003919453
#> 35 -0.0115196770    0.011519677
#> 36 -0.0083906820    0.008390682
#> 37 -0.0045547728    0.004554773
#> 38 -0.0059505046    0.005950505
#> 39 -0.0141838840    0.014183884
#> 40 -0.0059319861    0.005931986
#> 41  0.1512802038    0.000000000
#> 42  0.2808399700    0.017671365
#> 43  0.2232795791    0.014378650
#> 44  0.0975998578    0.006500081
#> 45  0.2877682547    0.019358622
#> 46  0.2073636749    0.014250294
#> 47  0.1095626637    0.008234682
#> 48  0.1431119488    0.010758359
#> 49  0.3410531860    0.025645425
#> 50  0.1425606071    0.010727564

#Extracts daily cohort-level output as a data frame
extract(S1, level = "cohort")
#>          date cohort           species        LAI    LAIlive     FPAR
#> 1  2001-01-01 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 2  2001-01-02 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 3  2001-01-03 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 4  2001-01-04 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 5  2001-01-05 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 6  2001-01-06 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 7  2001-01-07 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 8  2001-01-08 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 9  2001-01-09 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 10 2001-01-10 T1_148  Pinus halepensis 0.84874773 0.84874773 92.18285
#> 11 2001-01-01 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 12 2001-01-02 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 13 2001-01-03 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 14 2001-01-04 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 15 2001-01-05 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 16 2001-01-06 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 17 2001-01-07 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 18 2001-01-08 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 19 2001-01-09 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 20 2001-01-10 T2_168      Quercus ilex 0.70557382 0.70557382 72.36365
#> 21 2001-01-01 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 22 2001-01-02 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 23 2001-01-03 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 24 2001-01-04 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 25 2001-01-05 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 26 2001-01-06 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 27 2001-01-07 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 28 2001-01-08 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 29 2001-01-09 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 30 2001-01-10 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#>    AbsorbedSWRFraction Transpiration GrossPhotosynthesis    PlantPsi
#> 1            35.076344   0.092472560          0.89344066 -0.03300000
#> 2            35.076344   0.171673556          1.56118832 -0.02948689
#> 3            35.076344   0.136487346          1.30896941 -0.02885283
#> 4            35.076344   0.059660467          0.59729849 -0.02947804
#> 5            35.076344   0.175909215          1.62013553 -0.02475076
#> 6            35.076344   0.126757312          1.31218759 -0.02461802
#> 7            35.076344   0.066965916          0.74869004 -0.01523094
#> 8            35.076344   0.087471695          0.89459821 -0.01533101
#> 9            35.076344   0.208455948          1.59029898 -0.01546263
#> 10           35.076344   0.087135057          0.85665686 -0.01578063
#> 11           30.444383   0.052754988          0.62572744 -0.03300000
#> 12           30.444383   0.097935723          1.14620005 -0.03049966
#> 13           30.444383   0.077864175          0.92200901 -0.02999522
#> 14           30.444383   0.034036445          0.40700905 -0.03036014
#> 15           30.444383   0.100358724          1.17778929 -0.02702198
#> 16           30.444383   0.072319518          0.87162370 -0.02682544
#> 17           30.444383   0.038223420          0.46946107 -0.01980777
#> 18           30.444383   0.049927702          0.60002265 -0.01987372
#> 19           30.444383   0.118983337          1.34312681 -0.01996041
#> 20           30.444383   0.049734725          0.59224394 -0.02016944
#> 21            2.366131   0.006052657          0.05005525 -0.03300000
#> 22            2.366131   0.011230691          0.08987868 -0.03001177
#> 23            2.366131   0.008928058          0.07353544 -0.02944654
#> 24            2.366131   0.003902947          0.03291957 -0.02993754
#> 25            2.366131   0.011500315          0.09266457 -0.02594427
#> 26            2.366131   0.008286845          0.07122215 -0.02578034
#> 27            2.366131   0.004373328          0.03929044 -0.01774524
#> 28            2.366131   0.005712551          0.04876215 -0.01782514
#> 29            2.366131   0.013613902          0.09952356 -0.01793026
#> 30            2.366131   0.005690825          0.04751706 -0.01818431
#>         LeafPLC StemPLC PlantWaterBalance   LeafRWC   StemRWC      LFMC
#> 1  0.0030695571       0      0.000000e+00 0.9979679 0.9998350 125.89003
#> 2  0.0025073864       0      1.925211e-04 0.9981841 0.9998525 125.90500
#> 3  0.0024090008       0      3.474855e-05 0.9982232 0.9998557 125.90770
#> 4  0.0025060071       0     -3.426373e-05 0.9981847 0.9998526 125.90503
#> 5  0.0018581155       0      2.590835e-04 0.9984757 0.9998762 125.92517
#> 6  0.0017773706       0      7.275083e-06 0.9984839 0.9998769 125.92573
#> 7  0.0011252981       0      5.145541e-04 0.9990619 0.9999238 125.96572
#> 8  0.0005655351       0     -5.486169e-06 0.9990557 0.9999233 125.96530
#> 9  0.0005808366       0     -7.215671e-06 0.9990476 0.9999227 125.96474
#> 10 0.0006180483       0     -1.743292e-05 0.9990280 0.9999211 125.96338
#> 11 0.0000000000       0      0.000000e+00 0.9986794 0.9997489  93.07448
#> 12 0.0000000000       0      3.362677e-05 0.9987795 0.9997681  93.08044
#> 13 0.0000000000       0      6.780878e-06 0.9987997 0.9997719  93.08164
#> 14 0.0000000000       0     -4.905284e-06 0.9987851 0.9997691  93.08078
#> 15 0.0000000000       0      4.485175e-05 0.9989187 0.9997946  93.08873
#> 16 0.0000000000       0      2.639356e-06 0.9989266 0.9997961  93.08920
#> 17 0.0000000000       0      9.415034e-05 0.9992074 0.9998497  93.10591
#> 18 0.0000000000       0     -8.841289e-07 0.9992048 0.9998492  93.10575
#> 19 0.0000000000       0     -1.161973e-06 0.9992013 0.9998485  93.10554
#> 20 0.0000000000       0     -2.802174e-06 0.9991929 0.9998469  93.10505
#> 21 0.0000000000       0      0.000000e+00 0.9987207 0.9983684  96.39176
#> 22 0.0000000000       0      6.717764e-06 0.9988365 0.9985160  96.40467
#> 23 0.0000000000       0      1.270775e-06 0.9988584 0.9985440  96.40712
#> 24 0.0000000000       0     -1.103875e-06 0.9988394 0.9985197  96.40499
#> 25 0.0000000000       0      8.978323e-06 0.9989942 0.9987171  96.42225
#> 26 0.0000000000       0      3.686031e-07 0.9990005 0.9987252  96.42296
#> 27 0.0000000000       0      1.806986e-05 0.9993120 0.9991223  96.45769
#> 28 0.0000000000       0     -1.797218e-07 0.9993089 0.9991184  96.45734
#> 29 0.0000000000       0     -2.364348e-07 0.9993048 0.9991132  96.45689
#> 30 0.0000000000       0     -5.713839e-07 0.9992950 0.9991006  96.45579
#>    PlantStress
#> 1  0.005808769
#> 2  0.004924773
#> 3  0.004770200
#> 4  0.004922606
#> 5  0.003808935
#> 6  0.003778990
#> 7  0.001866942
#> 8  0.001884992
#> 9  0.001908817
#> 10 0.001966769
#> 11 0.010612890
#> 12 0.009762620
#> 13 0.009591531
#> 14 0.009715284
#> 15 0.008586431
#> 16 0.008520201
#> 17 0.006175187
#> 18 0.006197026
#> 19 0.006225735
#> 20 0.006294996
#> 21 0.003088161
#> 22 0.002730165
#> 23 0.002663598
#> 24 0.002721401
#> 25 0.002259779
#> 26 0.002241255
#> 27 0.001379780
#> 28 0.001387857
#> 29 0.001398499
#> 30 0.001424294

#Select the output tables/variables to be extracted
extract(S1, level ="cohort", output="Plants", vars = c("PlantStress", "StemPLC"))
#>          date cohort           species PlantStress StemPLC
#> 1  2001-01-01 T1_148  Pinus halepensis 0.005808769       0
#> 2  2001-01-02 T1_148  Pinus halepensis 0.004924773       0
#> 3  2001-01-03 T1_148  Pinus halepensis 0.004770200       0
#> 4  2001-01-04 T1_148  Pinus halepensis 0.004922606       0
#> 5  2001-01-05 T1_148  Pinus halepensis 0.003808935       0
#> 6  2001-01-06 T1_148  Pinus halepensis 0.003778990       0
#> 7  2001-01-07 T1_148  Pinus halepensis 0.001866942       0
#> 8  2001-01-08 T1_148  Pinus halepensis 0.001884992       0
#> 9  2001-01-09 T1_148  Pinus halepensis 0.001908817       0
#> 10 2001-01-10 T1_148  Pinus halepensis 0.001966769       0
#> 11 2001-01-01 T2_168      Quercus ilex 0.010612890       0
#> 12 2001-01-02 T2_168      Quercus ilex 0.009762620       0
#> 13 2001-01-03 T2_168      Quercus ilex 0.009591531       0
#> 14 2001-01-04 T2_168      Quercus ilex 0.009715284       0
#> 15 2001-01-05 T2_168      Quercus ilex 0.008586431       0
#> 16 2001-01-06 T2_168      Quercus ilex 0.008520201       0
#> 17 2001-01-07 T2_168      Quercus ilex 0.006175187       0
#> 18 2001-01-08 T2_168      Quercus ilex 0.006197026       0
#> 19 2001-01-09 T2_168      Quercus ilex 0.006225735       0
#> 20 2001-01-10 T2_168      Quercus ilex 0.006294996       0
#> 21 2001-01-01 S1_165 Quercus coccifera 0.003088161       0
#> 22 2001-01-02 S1_165 Quercus coccifera 0.002730165       0
#> 23 2001-01-03 S1_165 Quercus coccifera 0.002663598       0
#> 24 2001-01-04 S1_165 Quercus coccifera 0.002721401       0
#> 25 2001-01-05 S1_165 Quercus coccifera 0.002259779       0
#> 26 2001-01-06 S1_165 Quercus coccifera 0.002241255       0
#> 27 2001-01-07 S1_165 Quercus coccifera 0.001379780       0
#> 28 2001-01-08 S1_165 Quercus coccifera 0.001387857       0
#> 29 2001-01-09 S1_165 Quercus coccifera 0.001398499       0
#> 30 2001-01-10 S1_165 Quercus coccifera 0.001424294       0