Running examples in ‘wbstats-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: wb_data
> ### Title: Download Data from the World Bank API
> ### Aliases: wb_data
> 
> ### ** Examples
> 
> 
> 
> # gdp for all countries for all available dates
> 
> # Brazilian gdp for all available dates
> df_brazil <- wb_data("NY.GDP.MKTP.CD", country = "br")
> 
> # Brazilian gdp for 2006
> df_brazil_1 <- wb_data("NY.GDP.MKTP.CD", country = "brazil",
+                        start_date = 2006)
> 
> # Brazilian gdp for 2006-2010
> df_brazil_2 <- wb_data("NY.GDP.MKTP.CD", country = "BRA",
+                        start_date = 2006, end_date = 2010)
> 
> # Population, GDP, Unemployment Rate, Birth Rate (per 1000 people)
> my_indicators <- c("SP.POP.TOTL",
+                    "NY.GDP.MKTP.CD",
+                    "SL.UEM.TOTL.ZS",
+                    "SP.DYN.CBRT.IN")
> 
> 
> # you pass multiple country ids of different types
> # Albania (iso2c), Georgia (iso3c), and Mongolia
> my_countries <- c("AL", "Geo", "mongolia")
> df <- wb_data(my_indicators, country = my_countries,
+               start_date = 2005, end_date = 2007)
> 
> # same data as above, but in long format
> df_long <- wb_data(my_indicators, country = my_countries,
+                    start_date = 2005, end_date = 2007,
+                    return_wide = FALSE)
> 
> 
> # regional population totals
> # regions correspond to the region column in wb_cachelist$countries
> df_region <- wb_data("SP.POP.TOTL", country = "regions_only",
+                      start_date = 2010, end_date = 2014)
> 
> 
> # a specific region
> df_world <- wb_data("SP.POP.TOTL", country = "world",
+                     start_date = 2010, end_date = 2014)
> 
> 
> # if the indicator is part of a named vector the name will be the column name
> my_indicators <- c("pop" = "SP.POP.TOTL",
+                    "gdp" = "NY.GDP.MKTP.CD",
+                    "unemployment_rate" = "SL.UEM.TOTL.ZS",
+                    "birth_rate" = "SP.DYN.CBRT.IN")
> 
> df_names <- wb_data(my_indicators, country = "world",
+                     start_date = 2010, end_date = 2014)
Error: World Bank API request failed for indicator NY.GDP.MKTP.CD
message: Client error: (400) Bad Request
category: Client error
reason: Bad Request 
url: https://api.worldbank.org/v2/en/country/wld/indicator/NY.GDP.MKTP.CD?date=2010%3A2014&footnote=y&cntrycode=y&per_page=20000&format=json
Execution halted