Function extract()
extracts daily or subdaily output and returns it as a tidy data frame.
Arguments
- x
An object returned by simulation functions
spwb
,aspwb
,pwb
orgrowth
.- 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"
orlevel = "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"
orlevel = "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"
andlevel="sunlitleaf"
: "Abs_SWR","Abs_PAR","Net_LWR","E","Ag","An","Ci","Gsw","VPD","Temp","Psi","iWUE".
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 <- spwbInput(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): 4.73001
#> Initial soil water content (mm): 290.875
#> Initial snowpack content (mm): 0
#> Performing daily simulations
#>
#> [Year 2001]:
#>
#> Final plant water content (mm): 4.72995
#> Final soil water content (mm): 294.611
#> Final snowpack content (mm): 0
#> Change in plant water content (mm): -6.10983e-05
#> Plant water balance result (mm): -6.10844e-05
#> Change in soil water content (mm): 3.7356
#> Soil water balance result (mm): 3.7356
#> 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) 3 Herbaceous transpiration (mm) 0 Woody plant transpiration (mm) 3
#> Plant extraction from soil (mm) 3 Plant water balance (mm) -0 Hydraulic redistribution (mm) 0
#> Runoff (mm) 0 Deep drainage (mm) 21
#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.0728002 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.3636213 0.0000
#> 5 2001-01-05 1.6760567 1.884401 1.884401 0.0000 0.7547843 0.0000
#> 6 2001-01-06 1.2077028 13.359801 13.359801 0.0000 11.7252817 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.6738416 5.3774
#> Infiltration InfiltrationExcess SaturationExcess Runoff DeepDrainage
#> 1 3.4241795 0 0 0 2.7617207
#> 2 1.0728002 0 0 0 0.1899867
#> 3 0.0000000 0 0 0 0.0000000
#> 4 4.3636213 0 0 0 3.2495151
#> 5 0.7547843 0 0 0 0.1001772
#> 6 11.7252817 0 0 0 4.1214138
#> 7 0.0000000 0 0 0 4.1214138
#> 8 0.0000000 0 0 0 2.5926340
#> 9 0.0000000 0 0 0 0.0000000
#> 10 9.0512413 0 0 0 4.1214138
#> CapillarityRise Evapotranspiration Interception SoilEvaporation
#> 1 0 2.1073881 1.444929 0.4478948
#> 2 0 2.3231089 1.425491 0.5000000
#> 3 0 0.8014863 0.000000 0.4854151
#> 4 0 1.7311676 1.433352 0.1596697
#> 5 0 2.0365726 1.129617 0.5000000
#> 6 0 2.2354533 1.634519 0.3077228
#> 7 0 0.1546240 0.000000 0.0000000
#> 8 0 0.2019654 0.000000 0.0000000
#> 9 0 0.4812894 0.000000 0.0000000
#> 10 0 1.8368128 1.443926 0.1917182
#> HerbTranspiration PlantExtraction Transpiration HydraulicRedistribution
#> 1 0.011023432 0.2035406 0.2035406 0.000000000
#> 2 0.020463709 0.3771538 0.3771538 0.000000000
#> 3 0.016266929 0.2998042 0.2998042 0.000000000
#> 4 0.007111348 0.1310349 0.1310349 0.000000000
#> 5 0.020945746 0.3860097 0.3860097 0.000000000
#> 6 0.015092529 0.2781190 0.2781190 0.000000000
#> 7 0.007958208 0.1466657 0.1466657 0.001658730
#> 8 0.010395243 0.1915701 0.1915701 0.001891912
#> 9 0.024773584 0.4565159 0.4565159 0.000000000
#> 10 0.010355858 0.1908126 0.1908126 0.000000000
#> LAI LAIherb LAIlive LAIexpanded LAIdead Cm LgroundPAR
#> 1 1.758585 0.1736369 1.584948 1.584948 0 1.390485 40.00754
#> 2 1.756533 0.1736369 1.584948 1.582896 0 1.389459 40.05271
#> 3 1.756533 0.1736369 1.584948 1.582896 0 1.389459 40.05271
#> 4 1.756532 0.1736369 1.584948 1.582895 0 1.389458 40.05274
#> 5 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> 6 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> 7 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> 8 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> 9 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> 10 1.756459 0.1736369 1.584948 1.582823 0 1.389422 40.05433
#> LgroundSWR SWE
#> 1 50.73297 0.0000
#> 2 50.77539 0.0000
#> 3 50.77539 0.0000
#> 4 50.77541 0.0000
#> 5 50.77691 0.0000
#> 6 50.77691 0.0000
#> 7 50.77691 5.3774
#> 8 50.77691 5.3774
#> 9 50.77691 5.3774
#> 10 50.77691 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.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 2 2001-01-02 1 0.3029289 0.9997828 0.9996743 68.15901 -0.03303397
#> 3 2001-01-03 1 0.2998701 0.9896877 0.9845344 67.47078 -0.03465208
#> 4 2001-01-04 1 0.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 5 2001-01-05 1 0.3018732 0.9962985 0.9944487 67.92147 -0.03358379
#> 6 2001-01-06 1 0.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 7 2001-01-07 1 0.3025167 0.9984223 0.9976339 68.06625 -0.03324759
#> 8 2001-01-08 1 0.3018899 0.9963536 0.9945314 67.92522 -0.03357502
#> 9 2001-01-09 1 0.3005230 0.9918423 0.9877658 67.61767 -0.03430021
#> 10 2001-01-10 1 0.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 11 2001-01-01 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 12 2001-01-02 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 13 2001-01-03 2 0.3027773 0.9992825 0.9989240 116.56927 -0.03311237
#> 14 2001-01-04 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 15 2001-01-05 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 16 2001-01-06 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 17 2001-01-07 2 0.3029154 0.9997381 0.9996072 116.62242 -0.03304097
#> 18 2001-01-08 2 0.3028091 0.9993874 0.9990813 116.58151 -0.03309592
#> 19 2001-01-09 2 0.3024933 0.9983452 0.9975182 116.45993 -0.03325974
#> 20 2001-01-10 2 0.3029947 1.0000000 1.0000000 116.65297 -0.03300000
#> 21 2001-01-01 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 22 2001-01-02 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 23 2001-01-03 3 0.3029242 0.9997671 0.9996508 75.73104 -0.03303643
#> 24 2001-01-04 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 25 2001-01-05 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 26 2001-01-06 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 27 2001-01-07 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 28 2001-01-08 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 29 2001-01-09 3 0.3028728 0.9995975 0.9993963 75.71819 -0.03306299
#> 30 2001-01-10 3 0.3029947 1.0000000 1.0000000 75.74868 -0.03300000
#> 31 2001-01-01 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 32 2001-01-02 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 33 2001-01-03 4 0.3028755 0.9996065 0.9994098 30.28755 -0.03306158
#> 34 2001-01-04 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 35 2001-01-05 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 36 2001-01-06 4 0.3705006 1.2227955 1.3341314 37.05006 -0.01035437
#> 37 2001-01-07 4 0.3291213 1.0862278 1.1293177 32.91213 -0.02181811
#> 38 2001-01-08 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 39 2001-01-09 4 0.3027780 0.9992847 0.9989273 30.27780 -0.03311202
#> 40 2001-01-10 4 0.3403507 1.1232893 1.1848997 34.03507 -0.01812380
#> 41 2001-01-01 Overall 0.3029947 1.0000000 1.0000000 290.87494 -0.03300000
#> 42 2001-01-02 Overall 0.3029793 0.9999491 0.9999237 290.86014 -0.03300796
#> 43 2001-01-03 Overall 0.3021444 0.9971937 0.9957913 290.05865 -0.03344817
#> 44 2001-01-04 Overall 0.3029947 1.0000000 1.0000000 290.87494 -0.03300000
#> 45 2001-01-05 Overall 0.3027319 0.9991325 0.9986989 290.62259 -0.03313682
#> 46 2001-01-06 Overall 0.3100266 1.0232079 1.0348053 297.62552 -0.03064108
#> 47 2001-01-07 Overall 0.3055724 1.0085073 1.0127585 293.34949 -0.03190968
#> 48 2001-01-08 Overall 0.3026613 0.9988997 0.9983498 290.55489 -0.03317324
#> 49 2001-01-09 Overall 0.3021600 0.9972451 0.9958684 290.07360 -0.03343697
#> 50 2001-01-10 Overall 0.3068860 1.0128426 1.0192604 294.61054 -0.03145040
#> PlantExt HydraulicInput
#> 1 0.147990816 0.000000000
#> 2 0.274284815 0.000000000
#> 3 0.187989165 0.000000000
#> 4 0.080956152 0.000000000
#> 5 0.280725302 0.000000000
#> 6 0.173452219 0.000000000
#> 7 0.100307500 0.000000000
#> 8 0.131558125 0.000000000
#> 9 0.284975093 0.000000000
#> 10 0.118452195 0.000000000
#> 11 0.049247162 0.000000000
#> 12 0.091195256 0.000000000
#> 13 0.082541033 0.000000000
#> 14 0.036627132 0.000000000
#> 15 0.093336613 0.000000000
#> 16 0.077398069 0.000000000
#> 17 0.029984218 0.000000000
#> 18 0.040173749 0.000000000
#> 19 0.119816786 0.000000000
#> 20 0.050998413 0.000000000
#> 21 0.005050851 0.000000000
#> 22 0.009354689 0.000000000
#> 23 0.017435555 0.000000000
#> 24 0.008144219 0.000000000
#> 25 0.009574346 0.000000000
#> 26 0.016263052 0.000000000
#> 27 -0.001310085 0.001658730
#> 28 -0.001225646 0.001891912
#> 29 0.030181021 0.000000000
#> 30 0.013062366 0.000000000
#> 31 0.001251763 0.000000000
#> 32 0.002319017 0.000000000
#> 33 0.011838459 0.000000000
#> 34 0.005307351 0.000000000
#> 35 0.002373470 0.000000000
#> 36 0.011005677 0.000000000
#> 37 0.017684115 0.000000000
#> 38 0.021063890 0.000000000
#> 39 0.021542956 0.000000000
#> 40 0.008299633 0.000000000
#> 41 0.203540592 0.000000000
#> 42 0.377153777 0.000000000
#> 43 0.299804212 0.000000000
#> 44 0.131034853 0.000000000
#> 45 0.386009732 0.000000000
#> 46 0.278119017 0.000000000
#> 47 0.146665748 0.000000000
#> 48 0.191570119 0.000000000
#> 49 0.456515856 0.000000000
#> 50 0.190812607 0.000000000
#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.70352348 0.70557382 72.38566
#> 13 2001-01-03 T2_168 Quercus ilex 0.70352348 0.70557382 72.38566
#> 14 2001-01-04 T2_168 Quercus ilex 0.70352206 0.70557382 72.38566
#> 15 2001-01-05 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 16 2001-01-06 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 17 2001-01-07 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 18 2001-01-08 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 19 2001-01-09 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 20 2001-01-10 T2_168 Quercus ilex 0.70344991 0.70557382 72.38566
#> 21 2001-01-01 S1_165 Quercus coccifera 0.03062604 0.03062604 44.32407
#> 22 2001-01-02 S1_165 Quercus coccifera 0.03062498 0.03062604 44.37408
#> 23 2001-01-03 S1_165 Quercus coccifera 0.03062498 0.03062604 44.37408
#> 24 2001-01-04 S1_165 Quercus coccifera 0.03062498 0.03062604 44.37408
#> 25 2001-01-05 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> 26 2001-01-06 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> 27 2001-01-07 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> 28 2001-01-08 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> 29 2001-01-09 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> 30 2001-01-10 S1_165 Quercus coccifera 0.03062489 0.03062604 44.37408
#> AbsorbedSWRFraction Transpiration GrossPhotosynthesis PlantPsi
#> 1 35.076344 0.125013855 1.21341578 -0.03300000
#> 2 35.082685 0.231814863 2.10348703 -0.03300000
#> 3 35.082685 0.184272331 1.77396699 -0.03302923
#> 4 35.082685 0.080536010 0.81308802 -0.03443797
#> 5 35.082685 0.237258112 2.18356243 -0.03300000
#> 6 35.082685 0.170941003 1.79060063 -0.03350265
#> 7 35.082685 0.090146466 1.02742267 -0.03291028
#> 8 35.082685 0.117746145 1.21703794 -0.03316782
#> 9 35.082685 0.280590291 2.08857051 -0.03350647
#> 10 35.082685 0.117278013 1.16049105 -0.03415235
#> 11 30.444383 0.072474080 0.87313959 -0.03300000
#> 12 30.386677 0.134110679 1.59099654 -0.03300000
#> 13 30.386677 0.106606397 1.28193415 -0.03301702
#> 14 30.386677 0.046597341 0.56671908 -0.03388137
#> 15 30.386677 0.137259734 1.63354373 -0.03300000
#> 16 30.386677 0.098897800 1.21375667 -0.03329260
#> 17 30.386677 0.052152899 0.65412471 -0.03283336
#> 18 30.386677 0.068120642 0.83326878 -0.03305700
#> 19 30.386677 0.162334069 1.84698419 -0.03333137
#> 20 30.386677 0.067853365 0.82125418 -0.03377234
#> 21 2.366131 0.006052657 0.05005525 -0.03300000
#> 22 2.367553 0.011228235 0.08989595 -0.03300000
#> 23 2.367553 0.008925484 0.07354445 -0.03302310
#> 24 2.367553 0.003901502 0.03292091 -0.03415838
#> 25 2.367553 0.011491885 0.09263469 -0.03300000
#> 26 2.367553 0.008280215 0.07119441 -0.03339730
#> 27 2.367553 0.004366382 0.03924416 -0.03279120
#> 28 2.367553 0.005703332 0.04870346 -0.03306831
#> 29 2.367553 0.013591496 0.09940060 -0.03341750
#> 30 2.367553 0.005681228 0.04745642 -0.03395976
#> LeafPLC StemPLC PlantWaterBalance LeafRWC StemRWC LFMC
#> 1 0.000000e+00 0.000000e+00 0.000000e+00 0.9979679 0.9998350 125.86544
#> 2 0.000000e+00 0.000000e+00 0.000000e+00 0.9979679 0.9998350 125.86544
#> 3 0.000000e+00 0.000000e+00 -1.319457e-06 0.9979661 0.9998348 125.86529
#> 4 0.000000e+00 0.000000e+00 -6.358830e-05 0.9978794 0.9998278 125.85824
#> 5 0.000000e+00 0.000000e+00 6.490775e-05 0.9979679 0.9998350 125.86544
#> 6 0.000000e+00 0.000000e+00 -2.268898e-05 0.9979370 0.9998325 125.86292
#> 7 0.000000e+00 0.000000e+00 2.673892e-05 0.9979734 0.9998354 125.86589
#> 8 0.000000e+00 0.000000e+00 -1.162512e-05 0.9979576 0.9998341 125.86460
#> 9 0.000000e+00 0.000000e+00 -1.528648e-05 0.9979367 0.9998324 125.86290
#> 10 0.000000e+00 0.000000e+00 -2.915406e-05 0.9978970 0.9998292 125.85967
#> 11 2.905929e-03 3.681226e-09 0.000000e+00 0.9986797 0.9997500 93.05186
#> 12 2.905929e-03 3.681226e-09 0.000000e+00 0.9986797 0.9997500 92.91408
#> 13 2.907933e-03 3.687988e-09 -1.793122e-07 0.9986790 0.9997498 92.91402
#> 14 3.010191e-03 4.043372e-09 -9.108700e-06 0.9986445 0.9997433 92.91128
#> 15 3.010191e-03 4.043372e-09 9.287453e-06 0.9986797 0.9997500 92.90913
#> 16 3.010191e-03 4.043372e-09 -3.083267e-06 0.9986680 0.9997477 92.90824
#> 17 3.010191e-03 4.043372e-09 4.839227e-06 0.9986864 0.9997512 92.90964
#> 18 3.010191e-03 4.043372e-09 -2.356565e-06 0.9986774 0.9997495 92.90896
#> 19 3.010191e-03 4.043372e-09 -2.891243e-06 0.9986665 0.9997475 92.90812
#> 20 3.010191e-03 4.043372e-09 -4.646707e-06 0.9986488 0.9997441 92.90677
#> 21 3.473351e-05 4.394058e-08 0.000000e+00 0.9987207 0.9983684 96.38420
#> 22 3.473351e-05 4.394058e-08 0.000000e+00 0.9987207 0.9983684 96.38552
#> 23 3.478835e-05 4.403586e-08 -2.237386e-08 0.9987198 0.9983673 96.38542
#> 24 3.754355e-05 4.889290e-08 -1.099604e-06 0.9986758 0.9983112 96.38026
#> 25 3.754355e-05 4.889290e-08 1.121976e-06 0.9987207 0.9983684 96.38563
#> 26 3.754355e-05 4.889290e-08 -3.848146e-07 0.9987053 0.9983488 96.38382
#> 27 3.754355e-05 4.889290e-08 5.870562e-07 0.9987288 0.9983787 96.38658
#> 28 3.754355e-05 4.889290e-08 -2.684088e-07 0.9987180 0.9983650 96.38532
#> 29 3.754355e-05 4.889290e-08 -3.382177e-07 0.9987045 0.9983478 96.38373
#> 30 3.754355e-05 4.889290e-08 -5.252128e-07 0.9986835 0.9983210 96.38126
#> PlantStress
#> 1 0.004613739
#> 2 0.004613739
#> 3 0.004619875
#> 4 0.004918765
#> 5 0.004613739
#> 6 0.004719625
#> 7 0.004594923
#> 8 0.004649003
#> 9 0.004720434
#> 10 0.004857666
#> 11 0.006282261
#> 12 0.006282261
#> 13 0.006285972
#> 14 0.006474811
#> 15 0.006282261
#> 16 0.006346104
#> 17 0.006245937
#> 18 0.006294691
#> 19 0.006354571
#> 20 0.006450953
#> 21 0.003088161
#> 22 0.003088161
#> 23 0.003090967
#> 24 0.003229591
#> 25 0.003088161
#> 26 0.003136505
#> 27 0.003062823
#> 28 0.003096461
#> 29 0.003138968
#> 30 0.003205238
#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.004613739 0.000000e+00
#> 2 2001-01-02 T1_148 Pinus halepensis 0.004613739 0.000000e+00
#> 3 2001-01-03 T1_148 Pinus halepensis 0.004619875 0.000000e+00
#> 4 2001-01-04 T1_148 Pinus halepensis 0.004918765 0.000000e+00
#> 5 2001-01-05 T1_148 Pinus halepensis 0.004613739 0.000000e+00
#> 6 2001-01-06 T1_148 Pinus halepensis 0.004719625 0.000000e+00
#> 7 2001-01-07 T1_148 Pinus halepensis 0.004594923 0.000000e+00
#> 8 2001-01-08 T1_148 Pinus halepensis 0.004649003 0.000000e+00
#> 9 2001-01-09 T1_148 Pinus halepensis 0.004720434 0.000000e+00
#> 10 2001-01-10 T1_148 Pinus halepensis 0.004857666 0.000000e+00
#> 11 2001-01-01 T2_168 Quercus ilex 0.006282261 3.681226e-09
#> 12 2001-01-02 T2_168 Quercus ilex 0.006282261 3.681226e-09
#> 13 2001-01-03 T2_168 Quercus ilex 0.006285972 3.687988e-09
#> 14 2001-01-04 T2_168 Quercus ilex 0.006474811 4.043372e-09
#> 15 2001-01-05 T2_168 Quercus ilex 0.006282261 4.043372e-09
#> 16 2001-01-06 T2_168 Quercus ilex 0.006346104 4.043372e-09
#> 17 2001-01-07 T2_168 Quercus ilex 0.006245937 4.043372e-09
#> 18 2001-01-08 T2_168 Quercus ilex 0.006294691 4.043372e-09
#> 19 2001-01-09 T2_168 Quercus ilex 0.006354571 4.043372e-09
#> 20 2001-01-10 T2_168 Quercus ilex 0.006450953 4.043372e-09
#> 21 2001-01-01 S1_165 Quercus coccifera 0.003088161 4.394058e-08
#> 22 2001-01-02 S1_165 Quercus coccifera 0.003088161 4.394058e-08
#> 23 2001-01-03 S1_165 Quercus coccifera 0.003090967 4.403586e-08
#> 24 2001-01-04 S1_165 Quercus coccifera 0.003229591 4.889290e-08
#> 25 2001-01-05 S1_165 Quercus coccifera 0.003088161 4.889290e-08
#> 26 2001-01-06 S1_165 Quercus coccifera 0.003136505 4.889290e-08
#> 27 2001-01-07 S1_165 Quercus coccifera 0.003062823 4.889290e-08
#> 28 2001-01-08 S1_165 Quercus coccifera 0.003096461 4.889290e-08
#> 29 2001-01-09 S1_165 Quercus coccifera 0.003138968 4.889290e-08
#> 30 2001-01-10 S1_165 Quercus coccifera 0.003205238 4.889290e-08