stressBarplot: stress barplots in percentage of affected vessels

Description Usage Arguments Examples

View source: R/stressBarplot.R

Description

This function produces barplots of percentage of vessels affected per bin for various indicators facing baseline sce

Usage

1
2
3
stressBarplot(general = general, the_baseline = "svana_baseline",
  selected_vessels = selected_vessels_set_1, by_class = NULL,
  a_width = 3000, a_height = 2000)

Arguments

fname

First name

lname

Last name

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
## Not run: 

general <- setGeneralOverallVariable (pathToRawInputs =file.path("C:", "Users", "fbas", 
                                                "Documents", "GitHub", paste0("DISPLACE_input_gis_", 
                                                 "DanishFleet")),
                                      pathToDisplaceInputs = file.path("C:", "Users", "fbas", 
                                                "Documents", "GitHub", paste0("DISPLACE_input_", "DanishFleet")),
                                      pathToOutputs =file.path("C:","DISPLACE_outputs"),
                                      caseStudy="DanishFleet",
                                      iGraph=41,
                                      iYear="2015",
                                      iCountry="DEN",
                                      nbPops=39,
                                      nbSzgroup=14,
                                      theScenarios= c("svana_baseline",
                                                      "svana_sub1mx20",
                                                      "svana_sub4mx20",
                                                      "svana_sub4mx5ns20bt",
                                                      "svana_sub4mx20ns5bt",
                                                      "svana_sub4mx5ns5bt" ),
                                      nbSimus=20,
                                      useSQLite=FALSE    
                                      )

  selected_vessels_set_1 <- as.character(read.table(file.path(general$main.path, general$case_study,
          paste("selected_vessels_set_1.dat",sep='')), header=FALSE)[,1])


 # CAUTION: this following process can take a while!
 compareSimSimPlots(general=general, lst_loglike_agg_1=lst_loglike_agg_1, lst_loglike_agg_2=lst_loglike_agg_2, years_span=2015:2019, ...,
                                  explicit_pops=explicit_pops, plot_obs=TRUE,
                                      idx.sim=list(sce1=c(1), sce2=c(1)), combined_name=c("baseline_vs_implicit"),
                                        a.comment="", what="per_vessel", what2="weight", count=0,
                                         a.xlab="", a.ylab="", a.unit=1, do_mtext=FALSE)


  require(plotrix)
  stressBarplot (general=general,
                         the_baseline="svana_baseline",
                         selected_vessels=selected_vessels_set_1,
                         by_class=NULL,
                         a_width=1500, a_height=3500)


 
## End(Not run)  

frabas/displaceplot documentation built on May 3, 2019, 4:06 p.m.