Implement the mapCountryData function in a short and fast version.

bsps_map(data, mapTitle = "columnName")

Arguments

data

data.

mapTitle

title to add to the map, any string or 'columnName' to set it to the name of the data column.

Examples

# \donttest{ library(BayesSPsurv) walter <- spduration::add_duration(Walter_2015_JCR,"renewed_war", unitID = "id", tID = "year", freq = "year", ongoing = FALSE)
#> Registered S3 method overwritten by 'quantmod': #> method from #> as.zoo.data.frame zoo
#> Warning: Converting to 'Date' class with yyyy-06-30
walter <- BayesSPsurv::spatial_SA(data = walter, var_ccode = "ccode", threshold = 800L) set.seed(123456) model <- spatialSPsurv( duration = duration ~ victory + comprehensive + lgdpl + unpko, immune = atrisk ~ lgdpl, Y0 = 't.0', LY = 'lastyear', S = 'sp_id' , data = walter[[1]], N = 1500, burn = 300, thin = 15, w = c(1,1,1), m = 10, form = "Weibull", prop.varV = 1e-05, prop.varW = 1e-03, A = walter[[2]] ) bsps_map(data = model$W)
#> 46 codes from your data successfully matched countries in the map #> 0 codes from your data failed to match with a country code in the map #> 197 codes from the map weren't represented in your data
# }