diff --git a/DESCRIPTION b/DESCRIPTION index a20abfc..2b49d75 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,4 +16,4 @@ Suggests: gvc, testthat VignetteBuilder: knitr -RoxygenNote: 5.0.1 +RoxygenNote: 6.1.0 diff --git a/R/getWIOT.R b/R/getWIOT.R index 6c30514..e5be30d 100644 --- a/R/getWIOT.R +++ b/R/getWIOT.R @@ -63,14 +63,14 @@ #' ## wiot.2005 <- getWIOT(period = 2005, format = "list") #' ## industries <- 1:56 #' ## countries <- unique(substring(names(wiot.2005$x), 1, 3)) -#' ## decomp <- decomp(x = wiot.2005$Z, -#' ## y = wiot.2005$F, -#' ## k = countries, -#' ## i = industries, -#' ## o = wiot.2005$x, -#' ## V = wiot.2005$v, -#' ## method = "wwz", -#' ## verbose = TRUE) +#' ## res <- decomp(x = wiot.2005$Z, +#' ## y = wiot.2005$F, +#' ## k = countries, +#' ## i = wiot.2005$industry.names, +#' ## o = wiot.2005$x, +#' ## V = wiot.2005$v, +#' ## method = "wwz", +#' ## verbose = TRUE) getWIOT <- function(period = 2010, format = "wide", # or "long" or "list" as.DT = TRUE, # as data.table? @@ -100,7 +100,7 @@ getWIOT <- function(period = 2010, } ## WIOT2000_October16_ROW_list.rds - base.url <- "http://wiiw.ac.at/files/staff-content/reiter/" + base.url <- "https://wiiw.ac.at/files/staff-content/reiter/" res <- readRDS(file = gzcon(url(paste0(base.url, "WIOT", period, "_", version, "_ROW", diff --git a/R/wiod-package.R b/R/wiod-package.R index 6c4e0c4..5d0dcc6 100644 --- a/R/wiod-package.R +++ b/R/wiod-package.R @@ -17,11 +17,11 @@ #' data(wiot_1995) #' #' library(decompr) -#' w95 <- decomp(wiot_1995$inter, -#' wiot_1995$final, -#' wiot_1995$countries, -#' wiot_1995$industries, -#' wiot_1995$output, +#' w95 <- decomp(x = wiot_1995$inter, +#' y = wiot_1995$final, +#' k = wiot_1995$countries, +#' i = wiot_1995$industries, +#' o = wiot_1995$output, #' method="leontief") #' #' library(gvc) diff --git a/man/getWIOT.Rd b/man/getWIOT.Rd index 2a504ab..07878ab 100644 --- a/man/getWIOT.Rd +++ b/man/getWIOT.Rd @@ -71,17 +71,14 @@ wiot.2005 <- getWIOT(period = 2005, format = "wide") ## wiot.2005 <- getWIOT(period = 2005, format = "list") ## industries <- 1:56 ## countries <- unique(substring(names(wiot.2005$x), 1, 3)) -## decomp <- decomp(x = wiot.2005$Z, -## y = wiot.2005$F, -## k = countries, -## i = industries, -## o = wiot.2005$x, -## V = wiot.2005$v, -## method = "wwz", -## verbose = TRUE) -} -\author{ -Oliver Reiter +## res <- decomp(x = wiot.2005$Z, +## y = wiot.2005$F, +## k = countries, +## i = wiot.2005$industry.names, +## o = wiot.2005$x, +## V = wiot.2005$v, +## method = "wwz", +## verbose = TRUE) } \references{ Timmer, M. P., Dietzenbacher, E., Los, B., Stehrer, R. and de @@ -92,7 +89,9 @@ Vries, G. J. (2015), \seealso{ \url{http://www.wiod.org/database/wiots16} } +\author{ +Oliver Reiter +} \keyword{data,} \keyword{input-output,} \keyword{wiod} - diff --git a/man/wiod-package.Rd b/man/wiod-package.Rd index a61d6ab..a9ed5f1 100644 --- a/man/wiod-package.Rd +++ b/man/wiod-package.Rd @@ -13,11 +13,11 @@ Access to the data sets from the World Input Output data(wiot_1995) library(decompr) -w95 <- decomp(wiot_1995$inter, - wiot_1995$final, - wiot_1995$countries, - wiot_1995$industries, - wiot_1995$output, +w95 <- decomp(x = wiot_1995$inter, + y = wiot_1995$final, + k = wiot_1995$countries, + i = wiot_1995$industries, + o = wiot_1995$output, method="leontief") library(gvc) @@ -38,4 +38,3 @@ For the 2016 Release: {Timmer, M. P., Dietzenbacher, E., Los, B., \seealso{ \url{http://wwww.wiod.org/} \url{http://qua.st/decompr/docs/wiod/} } - diff --git a/tests/testthat/test_getWIOT.R b/tests/testthat/test_getWIOT.R index eb680bf..fa7996f 100644 --- a/tests/testthat/test_getWIOT.R +++ b/tests/testthat/test_getWIOT.R @@ -39,7 +39,7 @@ expect_equal(unique(res$Year), test.year) test.year <- sample(2000:2014, size = 1) message("Test year: ", test.year) res <- getWIOT(period = test.year, format = "list") -expect_equal(length(res), 6) +expect_equal(length(res), 7) expect_equal(res$year, test.year) expect_true(is.list(res)) expect_false(is.data.frame(res)) diff --git a/vignettes/wiod.Rmd b/vignettes/wiod.Rmd index a96dcff..b65f358 100644 --- a/vignettes/wiod.Rmd +++ b/vignettes/wiod.Rmd @@ -30,10 +30,10 @@ library(decompr) Apply the `leontief` decomposition and save the output to an object `l1995`. ```{r} -l1995 <- decomp(wiot_1995$inter, - wiot_1995$final, - wiot_1995$countries, - wiot_1995$industries, - wiot_1995$output, - method = "leontief" ) +l1995 <- decomp(x = wiot_1995$inter, + y = wiot_1995$final, + k = wiot_1995$countries, + i = wiot_1995$industries, + o = wiot_1995$output, + method = "leontief") ```