Skip to contents

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

Usage

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 <- 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.61
#> Final snowpack content (mm): 0
#> Change in plant water content (mm): -6.09432e-05
#> Plant water balance result (mm): -6.09432e-05
#> Change in soil water content (mm): 3.73471
#> Soil water balance result (mm): 3.73471
#> 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.24803369
#> 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.58912158
#> 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.7323314     1.434411       0.1596478
#> 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.2021576     0.000000       0.0000000
#> 9                0          0.4817475     0.000000       0.0000000
#> 10               0          1.8385016     1.445031       0.1921102
#>    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.001668074
#> 8        0.010386248       0.1917713     0.1917713             0.001890159
#> 9        0.024752147       0.4569954     0.4569954             0.000000000
#> 10       0.010346897       0.1910131     0.1910131             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.2998696 0.9896859 0.9845318  67.47066 -0.03465236
#> 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.3025199 0.9984330 0.9976499  68.06699 -0.03324590
#> 8  2001-01-08         1 0.3018945 0.9963689 0.9945543  67.92627 -0.03357259
#> 9  2001-01-09         1 0.3005298 0.9918647 0.9877993  67.61920 -0.03429657
#> 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.3027769 0.9992811 0.9989219 116.56911 -0.03311258
#> 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.3029161 0.9997404 0.9996107 116.62269 -0.03304061
#> 18 2001-01-08         2 0.3028097 0.9993892 0.9990840 116.58172 -0.03309563
#> 19 2001-01-09         2 0.3024919 0.9983404 0.9975111 116.45937 -0.03326049
#> 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.9997668 0.9996503  75.73102 -0.03303648
#> 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.3028723 0.9995959 0.9993939  75.71807 -0.03306325
#> 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.9996060 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.3290906 1.0861266 1.1291660  32.90906 -0.02182896
#> 38 2001-01-08         4 0.3029947 1.0000000 1.0000000  30.29947 -0.03300000
#> 39 2001-01-09         4 0.3027775 0.9992831 0.9989249  30.27775 -0.03311227
#> 40 2001-01-10         4 0.3403418 1.1232598 1.1848555  34.03418 -0.01812652
#> 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.03191027
#> 48 2001-01-08   Overall 0.3026626 0.9989040 0.9983563 290.55614 -0.03317255
#> 49 2001-01-09   Overall 0.3021608 0.9972478 0.9958725 290.07440 -0.03343652
#> 50 2001-01-10   Overall 0.3068850 1.0128396 1.0192558 294.60965 -0.03145068
#>        PlantExt HydraulicInput
#> 1   0.147990816    0.000000000
#> 2   0.274498074    0.000000000
#> 3   0.188090723    0.000000000
#> 4   0.080374764    0.000000000
#> 5   0.280955644    0.000000000
#> 6   0.173076324    0.000000000
#> 7   0.099582722    0.000000000
#> 8   0.131256011    0.000000000
#> 9   0.284509817    0.000000000
#> 10  0.117915754    0.000000000
#> 11  0.049247162    0.000000000
#> 12  0.091345203    0.000000000
#> 13  0.082703478    0.000000000
#> 14  0.037242235    0.000000000
#> 15  0.093494100    0.000000000
#> 16  0.077972621    0.000000000
#> 17  0.029714327    0.000000000
#> 18  0.040231132    0.000000000
#> 19  0.120588842    0.000000000
#> 20  0.051601030    0.000000000
#> 21  0.005050851    0.000000000
#> 22  0.009368479    0.000000000
#> 23  0.017460130    0.000000000
#> 24  0.008219694    0.000000000
#> 25  0.009588873    0.000000000
#> 26  0.016331634    0.000000000
#> 27 -0.001342148    0.001668074
#> 28 -0.001224115    0.001890159
#> 29  0.030304934    0.000000000
#> 30  0.013163094    0.000000000
#> 31  0.001251763    0.000000000
#> 32  0.002321810    0.000000000
#> 33  0.011851680    0.000000000
#> 34  0.005330219    0.000000000
#> 35  0.002376431    0.000000000
#> 36  0.011030386    0.000000000
#> 37  0.018864847    0.000000000
#> 38  0.021508294    0.000000000
#> 39  0.021591796    0.000000000
#> 40  0.008333191    0.000000000
#> 41  0.203540592    0.000000000
#> 42  0.377533566    0.000000000
#> 43  0.300106010    0.000000000
#> 44  0.131166911    0.000000000
#> 45  0.386415047    0.000000000
#> 46  0.278410965    0.000000000
#> 47  0.146819749    0.000000000
#> 48  0.191771323    0.000000000
#> 49  0.456995389    0.000000000
#> 50  0.191013069    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.080558589          0.81331597 -0.03443824
#> 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.117784164          1.21743091 -0.03316636
#> 9            35.076344   0.280680932          2.08924520 -0.03350435
#> 10           35.076344   0.117315922          1.16086617 -0.03414931
#> 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.03388161
#> 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.068284381          0.83523580 -0.03305607
#> 19           30.444383   0.162724279          1.85134435 -0.03333002
#> 20           30.444383   0.068016470          0.82319293 -0.03377086
#> 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.03415864
#> 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.005702778          0.04867873 -0.03306716
#> 29            2.366131   0.013590177          0.09935012 -0.03341577
#> 30            2.366131   0.005680677          0.04743233 -0.03395749
#>         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.351485e-05 0.9978794 0.9998278 125.88391
#> 5  0.000000e+00 0.000000e+00      6.492007e-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.155893e-05 0.9979577 0.9998341 125.88933
#> 9  0.000000e+00 0.000000e+00     -1.525615e-05 0.9979369 0.9998324 125.88789
#> 10 0.000000e+00 0.000000e+00     -2.911272e-05 0.9978972 0.9998292 125.88514
#> 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.010220e-03 4.043476e-09     -9.115197e-06 0.9986445 0.9997433  93.07245
#> 15 3.010220e-03 4.043476e-09      9.306491e-06 0.9986797 0.9997500  93.07454
#> 16 3.010220e-03 4.043476e-09     -3.099276e-06 0.9986680 0.9997477  93.07384
#> 17 3.010220e-03 4.043476e-09      4.858057e-06 0.9986864 0.9997512  93.07494
#> 18 3.010220e-03 4.043476e-09     -2.350635e-06 0.9986775 0.9997495  93.07441
#> 19 3.010220e-03 4.043476e-09     -2.891961e-06 0.9986665 0.9997475  93.07376
#> 20 3.010220e-03 4.043476e-09     -4.653597e-06 0.9986489 0.9997441  93.07271
#> 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.754418e-05 4.889404e-08     -1.098417e-06 0.9986757 0.9983112  96.38676
#> 25 3.754418e-05 4.889404e-08      1.122246e-06 0.9987207 0.9983684  96.39176
#> 26 3.754418e-05 4.889404e-08     -3.861356e-07 0.9987052 0.9983487  96.39004
#> 27 3.754418e-05 4.889404e-08      5.883507e-07 0.9987288 0.9983787  96.39266
#> 28 3.754418e-05 4.889404e-08     -2.672712e-07 0.9987181 0.9983651  96.39147
#> 29 3.754418e-05 4.889404e-08     -3.376583e-07 0.9987045 0.9983479  96.38997
#> 30 3.754418e-05 4.889404e-08     -5.247081e-07 0.9986835 0.9983211  96.38763
#>    PlantStress
#> 1  0.004613739
#> 2  0.004613739
#> 3  0.004620274
#> 4  0.004918823
#> 5  0.004613739
#> 6  0.004719988
#> 7  0.004594925
#> 8  0.004648697
#> 9  0.004719985
#> 10 0.004857016
#> 11 0.006282261
#> 12 0.006282261
#> 13 0.006286213
#> 14 0.006474864
#> 15 0.006282261
#> 16 0.006346322
#> 17 0.006245943
#> 18 0.006294488
#> 19 0.006354276
#> 20 0.006450630
#> 21 0.003088161
#> 22 0.003088161
#> 23 0.003091150
#> 24 0.003229622
#> 25 0.003088161
#> 26 0.003136670
#> 27 0.003062826
#> 28 0.003096322
#> 29 0.003138757
#> 30 0.003204961

#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.004918823 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.004648697 0.000000e+00
#> 9  2001-01-09 T1_148  Pinus halepensis 0.004719985 0.000000e+00
#> 10 2001-01-10 T1_148  Pinus halepensis 0.004857016 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.006474864 4.043476e-09
#> 15 2001-01-05 T2_168      Quercus ilex 0.006282261 4.043476e-09
#> 16 2001-01-06 T2_168      Quercus ilex 0.006346322 4.043476e-09
#> 17 2001-01-07 T2_168      Quercus ilex 0.006245943 4.043476e-09
#> 18 2001-01-08 T2_168      Quercus ilex 0.006294488 4.043476e-09
#> 19 2001-01-09 T2_168      Quercus ilex 0.006354276 4.043476e-09
#> 20 2001-01-10 T2_168      Quercus ilex 0.006450630 4.043476e-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.003229622 4.889404e-08
#> 25 2001-01-05 S1_165 Quercus coccifera 0.003088161 4.889404e-08
#> 26 2001-01-06 S1_165 Quercus coccifera 0.003136670 4.889404e-08
#> 27 2001-01-07 S1_165 Quercus coccifera 0.003062826 4.889404e-08
#> 28 2001-01-08 S1_165 Quercus coccifera 0.003096322 4.889404e-08
#> 29 2001-01-09 S1_165 Quercus coccifera 0.003138757 4.889404e-08
#> 30 2001-01-10 S1_165 Quercus coccifera 0.003204961 4.889404e-08