Learn R Programming

medfate (version 2.3.7)

shinyplot: Shiny app with interactive plots

Description

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

Usage

shinyplot(out, measuredData = NULL, SpParams = NULL)

Arguments

out

An object of class spwb or growth

measuredData

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

SpParams

A data frame with species parameters (see SpParamsMED).

Value

An object that represents the shiny app

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
# NOT RUN {
## Only run this example in interactive R sessions
if (interactive()) {
#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)
examplesoil1 = soil(defaultSoilParams(4))

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

#Initialize input
x1 = forest2spwbInput(exampleforestMED,examplesoil1, 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, SpParamsMED)
}
# }

Run the code above in your browser using DataLab