Learn R Programming

medfate (version 2.8.0)

shinyplot: Shiny app with interactive plots

Description

Creates a shiny app with interactive plots for simulation results and evaluation

Usage

# S3 method for spwb
shinyplot(x, measuredData = NULL, ...)
# S3 method for pwb
shinyplot(x, measuredData = NULL, ...)
# S3 method for growth
shinyplot(x, measuredData = NULL, ...)
# S3 method for fordyn
shinyplot(x, measuredData = NULL, ...)
# S3 method for spwb_day
shinyplot(x, ...)
# S3 method for pwb_day
shinyplot(x, ...)
# S3 method for growth_day
shinyplot(x, ...)

Value

An object that represents the shiny app

Arguments

x

An object of the right class.

measuredData

A data frame with observed/measured values (see evaluation_plot).

...

Additional parameters.

Author

Miquel De Cáceres Ainsa, CREAF

Details

Only run this function in interactive mode. When measuredData is not NULL, an additional panel is shown for evaluation plots.

See Also

plot.spwb, evaluation_plot

Examples

Run this code
## Only run this example in interactive R sessions
if (FALSE) {
#Load example daily meteorological data
data(examplemeteo)

#Load example plot plant data
data(exampleforestMED)

#Default species parameterization
data(SpParamsMED)

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

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

#Initialize input
x1 = forest2spwbInput(exampleforestMED, examplesoil, SpParamsMED, control)

#Call simulation function
S1<-spwb(x1, examplemeteo, latitude = 41.82592, elevation = 100)

#Load observed data (in this case the same simulation results with some added error)  
data(exampleobs)

#Call interactive plot shiny app
shinyplot(S1, exampleobs)
}

Run the code above in your browser using DataLab