save_sensi.RdHelper functions to conveniently read or save sensitivity outputs from
the sensitive_stics() function
save_sensi( x, dirpath = getwd(), device = "png", width = NULL, height = NULL, units = c("in", "cm", "mm"), ... ) load_sensi(dirpath = getwd())
| x | The output from the   | 
    
|---|---|
| dirpath | Path to the directory where to save the plots and objects  | 
    
| device | Device to use for the   | 
    
| width, height | Plot dimensions in   | 
    
| units | Units to use for the plot size parameters them (see details and example)  | 
    
| ... | Further parameters to pass to   | 
    
The function first save all the gg_objects from the output of
sensitive_stics() as images, save the full xobject using
base::saveRDS(), and write a readme file for convenience.
if (FALSE) { library(sticRs) # Making a sensitivity analysis on two parameters: sens= sensitive_stics(dir.orig = "0-DATA/dummy/SC_Wheat", dir.targ = "Sensitivity", stics = "0-DATA/stics_executable/original/stics.exe", obs_name = "Wheat_N0.obs", Parameters= list(interrang= list(min=0.05, max=0.25), P_densitesem= list(min=140, max=280)), Vars = c("raint", "lai(n)", "masec(n)"), method= "fast99", n= 10, q= "qunif",q.arg = list(list(min=0.05, max=0.25), list(min=140, max=280))) # Saving the output : save_sensi(x = sens,dirpath = "3-Results/Sensitivity", width = 16,height = 9,units = "in") sens= load_sensi(dirpath = "3-Results/Sensitivity") }