Function extract()
extracts daily or subdaily output and returns it as a tidy data frame.
Arguments
- x
An object returned by simulation functions
spwb
,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.609
#> Final snowpack content (mm): 0
#> Change in plant water content (mm): -6.11429e-05
#> Plant water balance result (mm): -6.11429e-05
#> Change in soil water content (mm): 3.73364
#> Soil water balance result (mm): 3.73364
#> 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.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 2.76172073
#> 2 1.0717469 0 0 0 0.18953238
#> 3 0.0000000 0 0 0 0.00000000
#> 4 4.3625616 0 0 0 3.24803989
#> 5 0.7539027 0 0 0 0.09976167
#> 6 11.7240275 0 0 0 4.12141379
#> 7 0.0000000 0 0 0 4.12141379
#> 8 0.0000000 0 0 0 2.59067430
#> 9 0.0000000 0 0 0 0.00000000
#> 10 9.0501360 0 0 0 4.12141379
#> CapillarityRise Evapotranspiration Interception SoilEvaporation
#> 1 0 2.1073881 1.444929 0.4478948
#> 2 0 2.3245249 1.426545 0.5000000
#> 3 0 0.8008422 0.000000 0.4844828
#> 4 0 1.7323252 1.434411 0.1596416
#> 5 0 2.0378414 1.130499 0.5000000
#> 6 0 2.2365181 1.635773 0.3072545
#> 7 0 0.1547711 0.000000 0.0000000
#> 8 0 0.2021575 0.000000 0.0000000
#> 9 0 0.4817473 0.000000 0.0000000
#> 10 0 1.8380134 1.445031 0.1916221
#> HerbTranspiration PlantExtraction Transpiration HydraulicRedistribution
#> 1 0.011023432 0.2035406 0.2035406 0.000000000
#> 2 0.020446613 0.3775336 0.3775336 0.000000000
#> 3 0.016253339 0.3001060 0.3001060 0.000000000
#> 4 0.007105403 0.1311669 0.1311669 0.000000000
#> 5 0.020927620 0.3864150 0.3864150 0.000000000
#> 6 0.015079467 0.2784110 0.2784110 0.000000000
#> 7 0.007951321 0.1468197 0.1468197 0.001659257
#> 8 0.010386247 0.1917713 0.1917713 0.001892108
#> 9 0.024752145 0.4569952 0.4569952 0.000000000
#> 10 0.010346896 0.1910129 0.1910129 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.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.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 2 2001-01-02 1 0.3029247 0.9997687 0.9996532 68.15805 -0.03303618
#> 3 2001-01-03 1 0.2998695 0.9896854 0.9845310 67.47063 -0.03465244
#> 4 2001-01-04 1 0.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 5 2001-01-05 1 0.3018694 0.9962859 0.9944299 67.92061 -0.03358578
#> 6 2001-01-06 1 0.3029947 1.0000000 1.0000000 68.17381 -0.03300000
#> 7 2001-01-07 1 0.3025164 0.9984212 0.9976322 68.06618 -0.03324776
#> 8 2001-01-08 1 0.3018891 0.9963511 0.9945276 67.92505 -0.03357542
#> 9 2001-01-09 1 0.3005213 0.9918368 0.9877575 67.61730 -0.03430110
#> 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.3027770 0.9992814 0.9989223 116.56914 -0.03311254
#> 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.3029152 0.9997377 0.9996066 116.62237 -0.03304104
#> 18 2001-01-08 2 0.3028088 0.9993863 0.9990797 116.58138 -0.03309609
#> 19 2001-01-09 2 0.3024925 0.9983425 0.9975142 116.45962 -0.03326016
#> 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.3029241 0.9997669 0.9996504 75.73102 -0.03303647
#> 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.3028726 0.9995970 0.9993955 75.71815 -0.03306308
#> 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.3028754 0.9996061 0.9994092 30.28754 -0.03306165
#> 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.3704814 1.2227322 1.3340364 37.04814 -0.01035855
#> 37 2001-01-07 4 0.3291019 1.0861639 1.1292219 32.91019 -0.02182496
#> 38 2001-01-08 4 0.3029947 1.0000000 1.0000000 30.29947 -0.03300000
#> 39 2001-01-09 4 0.3027777 0.9992838 0.9989260 30.27777 -0.03311216
#> 40 2001-01-10 4 0.3403312 1.1232247 1.1848028 34.03312 -0.01812978
#> 41 2001-01-01 Overall 0.3029947 1.0000000 1.0000000 290.87494 -0.03300000
#> 42 2001-01-02 Overall 0.3029783 0.9999458 0.9999187 290.85917 -0.03300848
#> 43 2001-01-03 Overall 0.3021441 0.9971926 0.9957897 290.05833 -0.03344835
#> 44 2001-01-04 Overall 0.3029947 1.0000000 1.0000000 290.87494 -0.03300000
#> 45 2001-01-05 Overall 0.3027310 0.9991295 0.9986945 290.62174 -0.03313729
#> 46 2001-01-06 Overall 0.3100246 1.0232013 1.0347955 297.62361 -0.03064152
#> 47 2001-01-07 Overall 0.3055702 1.0085002 1.0127479 293.34742 -0.03191046
#> 48 2001-01-08 Overall 0.3026610 0.9988987 0.9983483 290.55459 -0.03317340
#> 49 2001-01-09 Overall 0.3021592 0.9972425 0.9958645 290.07284 -0.03343739
#> 50 2001-01-10 Overall 0.3068839 1.0128359 1.0192503 294.60858 -0.03145102
#> PlantExt HydraulicInput
#> 1 0.147990816 0.000000000
#> 2 0.274498074 0.000000000
#> 3 0.188124262 0.000000000
#> 4 0.081015296 0.000000000
#> 5 0.280955644 0.000000000
#> 6 0.173584139 0.000000000
#> 7 0.100389164 0.000000000
#> 8 0.131663688 0.000000000
#> 9 0.285196936 0.000000000
#> 10 0.118543714 0.000000000
#> 11 0.049247162 0.000000000
#> 12 0.091345203 0.000000000
#> 13 0.082673940 0.000000000
#> 14 0.036683873 0.000000000
#> 15 0.093494100 0.000000000
#> 16 0.077525490 0.000000000
#> 17 0.030038131 0.000000000
#> 18 0.040245873 0.000000000
#> 19 0.120006918 0.000000000
#> 20 0.051079279 0.000000000
#> 21 0.005050851 0.000000000
#> 22 0.009368479 0.000000000
#> 23 0.017456967 0.000000000
#> 24 0.008154525 0.000000000
#> 25 0.009588873 0.000000000
#> 26 0.016283686 0.000000000
#> 27 -0.001309769 0.001659257
#> 28 -0.001224027 0.001892108
#> 29 0.030221667 0.000000000
#> 30 0.013080124 0.000000000
#> 31 0.001251763 0.000000000
#> 32 0.002321810 0.000000000
#> 33 0.011850842 0.000000000
#> 34 0.005313216 0.000000000
#> 35 0.002376431 0.000000000
#> 36 0.011017650 0.000000000
#> 37 0.017702224 0.000000000
#> 38 0.021085731 0.000000000
#> 39 0.021569657 0.000000000
#> 40 0.008309820 0.000000000
#> 41 0.203540592 0.000000000
#> 42 0.377533566 0.000000000
#> 43 0.300106010 0.000000000
#> 44 0.131166910 0.000000000
#> 45 0.386415047 0.000000000
#> 46 0.278410965 0.000000000
#> 47 0.146819749 0.000000000
#> 48 0.191771265 0.000000000
#> 49 0.456995178 0.000000000
#> 50 0.191012938 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.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.125013855 1.21341578 -0.03300000
#> 2 35.076344 0.231879677 2.10407515 -0.03300000
#> 3 35.076344 0.184323778 1.77446227 -0.03303113
#> 4 35.076344 0.080558588 0.81331596 -0.03443831
#> 5 35.076344 0.237334648 2.18426681 -0.03300000
#> 6 35.076344 0.170996083 1.79117760 -0.03350436
#> 7 35.076344 0.090175546 1.02775410 -0.03291029
#> 8 35.076344 0.117784123 1.21743049 -0.03316800
#> 9 35.076344 0.280680784 2.08924409 -0.03350684
#> 10 35.076344 0.117315825 1.16086520 -0.03415318
#> 11 30.444383 0.072474080 0.87313959 -0.03300000
#> 12 30.444383 0.134427230 1.59468338 -0.03300000
#> 13 30.444383 0.106858002 1.28490448 -0.03301812
#> 14 30.444383 0.046707364 0.56803278 -0.03388163
#> 15 30.444383 0.137589632 1.63739954 -0.03300000
#> 16 30.444383 0.099135474 1.21662135 -0.03329360
#> 17 30.444383 0.052278246 0.65566870 -0.03283339
#> 18 30.444383 0.068284364 0.83523560 -0.03305717
#> 19 30.444383 0.162724221 1.85134369 -0.03333165
#> 20 30.444383 0.068016438 0.82319255 -0.03377298
#> 21 2.366131 0.006052657 0.05005525 -0.03300000
#> 22 2.366131 0.011226660 0.08984642 -0.03300000
#> 23 2.366131 0.008924231 0.07350392 -0.03302460
#> 24 2.366131 0.003900958 0.03290279 -0.03415868
#> 25 2.366131 0.011490767 0.09258764 -0.03300000
#> 26 2.366131 0.008279408 0.07115823 -0.03339865
#> 27 2.366131 0.004365957 0.03922422 -0.03279123
#> 28 2.366131 0.005702777 0.04867872 -0.03306852
#> 29 2.366131 0.013590173 0.09935010 -0.03341782
#> 30 2.366131 0.005680675 0.04743231 -0.03396049
#> LeafPLC StemPLC PlantWaterBalance LeafRWC StemRWC LFMC
#> 1 0.000000e+00 0.000000e+00 0.000000e+00 0.9979679 0.9998350 125.89003
#> 2 0.000000e+00 0.000000e+00 0.000000e+00 0.9979679 0.9998350 125.89003
#> 3 0.000000e+00 0.000000e+00 -1.405221e-06 0.9979660 0.9998348 125.88990
#> 4 0.000000e+00 0.000000e+00 -6.351778e-05 0.9978794 0.9998278 125.88391
#> 5 0.000000e+00 0.000000e+00 6.492300e-05 0.9979679 0.9998350 125.89003
#> 6 0.000000e+00 0.000000e+00 -2.276642e-05 0.9979369 0.9998324 125.88789
#> 7 0.000000e+00 0.000000e+00 2.681584e-05 0.9979734 0.9998354 125.89042
#> 8 0.000000e+00 0.000000e+00 -1.163300e-05 0.9979576 0.9998341 125.88932
#> 9 0.000000e+00 0.000000e+00 -1.529465e-05 0.9979367 0.9998324 125.88788
#> 10 0.000000e+00 0.000000e+00 -2.917462e-05 0.9978969 0.9998292 125.88512
#> 11 2.905929e-03 3.681226e-09 0.000000e+00 0.9986797 0.9997500 93.07454
#> 12 2.905929e-03 3.681226e-09 0.000000e+00 0.9986797 0.9997500 93.07454
#> 13 2.908064e-03 3.688428e-09 -1.912943e-07 0.9986790 0.9997498 93.07450
#> 14 3.010223e-03 4.043485e-09 -9.115434e-06 0.9986445 0.9997433 93.07245
#> 15 3.010223e-03 4.043485e-09 9.306728e-06 0.9986797 0.9997500 93.07454
#> 16 3.010223e-03 4.043485e-09 -3.099276e-06 0.9986680 0.9997477 93.07384
#> 17 3.010223e-03 4.043485e-09 4.858057e-06 0.9986864 0.9997512 93.07494
#> 18 3.010223e-03 4.043485e-09 -2.362248e-06 0.9986774 0.9997495 93.07441
#> 19 3.010223e-03 4.043485e-09 -2.897502e-06 0.9986665 0.9997475 93.07375
#> 20 3.010223e-03 4.043485e-09 -4.658809e-06 0.9986488 0.9997441 93.07270
#> 21 3.473351e-05 4.394058e-08 0.000000e+00 0.9987207 0.9983684 96.39176
#> 22 3.473351e-05 4.394058e-08 0.000000e+00 0.9987207 0.9983684 96.39176
#> 23 3.479192e-05 4.404206e-08 -2.382859e-08 0.9987197 0.9983672 96.39166
#> 24 3.754429e-05 4.889424e-08 -1.098460e-06 0.9986757 0.9983112 96.38676
#> 25 3.754429e-05 4.889424e-08 1.122288e-06 0.9987207 0.9983684 96.39176
#> 26 3.754429e-05 4.889424e-08 -3.861356e-07 0.9987052 0.9983487 96.39004
#> 27 3.754429e-05 4.889424e-08 5.883507e-07 0.9987288 0.9983787 96.39266
#> 28 3.754429e-05 4.889424e-08 -2.685794e-07 0.9987180 0.9983650 96.39147
#> 29 3.754429e-05 4.889424e-08 -3.383386e-07 0.9987045 0.9983478 96.38996
#> 30 3.754429e-05 4.889424e-08 -5.256188e-07 0.9986834 0.9983209 96.38761
#> PlantStress
#> 1 0.004613739
#> 2 0.004613739
#> 3 0.004620274
#> 4 0.004918837
#> 5 0.004613739
#> 6 0.004719988
#> 7 0.004594925
#> 8 0.004649042
#> 9 0.004720512
#> 10 0.004857841
#> 11 0.006282261
#> 12 0.006282261
#> 13 0.006286213
#> 14 0.006474869
#> 15 0.006282261
#> 16 0.006346322
#> 17 0.006245943
#> 18 0.006294728
#> 19 0.006354631
#> 20 0.006451094
#> 21 0.003088161
#> 22 0.003088161
#> 23 0.003091150
#> 24 0.003229628
#> 25 0.003088161
#> 26 0.003136670
#> 27 0.003062826
#> 28 0.003096486
#> 29 0.003139007
#> 30 0.003205327
#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.004620274 0.000000e+00
#> 4 2001-01-04 T1_148 Pinus halepensis 0.004918837 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.004719988 0.000000e+00
#> 7 2001-01-07 T1_148 Pinus halepensis 0.004594925 0.000000e+00
#> 8 2001-01-08 T1_148 Pinus halepensis 0.004649042 0.000000e+00
#> 9 2001-01-09 T1_148 Pinus halepensis 0.004720512 0.000000e+00
#> 10 2001-01-10 T1_148 Pinus halepensis 0.004857841 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.006286213 3.688428e-09
#> 14 2001-01-04 T2_168 Quercus ilex 0.006474869 4.043485e-09
#> 15 2001-01-05 T2_168 Quercus ilex 0.006282261 4.043485e-09
#> 16 2001-01-06 T2_168 Quercus ilex 0.006346322 4.043485e-09
#> 17 2001-01-07 T2_168 Quercus ilex 0.006245943 4.043485e-09
#> 18 2001-01-08 T2_168 Quercus ilex 0.006294728 4.043485e-09
#> 19 2001-01-09 T2_168 Quercus ilex 0.006354631 4.043485e-09
#> 20 2001-01-10 T2_168 Quercus ilex 0.006451094 4.043485e-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.003091150 4.404206e-08
#> 24 2001-01-04 S1_165 Quercus coccifera 0.003229628 4.889424e-08
#> 25 2001-01-05 S1_165 Quercus coccifera 0.003088161 4.889424e-08
#> 26 2001-01-06 S1_165 Quercus coccifera 0.003136670 4.889424e-08
#> 27 2001-01-07 S1_165 Quercus coccifera 0.003062826 4.889424e-08
#> 28 2001-01-08 S1_165 Quercus coccifera 0.003096486 4.889424e-08
#> 29 2001-01-09 S1_165 Quercus coccifera 0.003139007 4.889424e-08
#> 30 2001-01-10 S1_165 Quercus coccifera 0.003205327 4.889424e-08