Closed antaldaniel closed 2 years ago
library(iotables)
library(xlsx)
library(dplyr)
###############################
nl <- netherlands_2006
input_coeff_nl <- input_coefficient_matrix_create(
data_table = netherlands_2006,
households = FALSE)
compensation_indicator <- input_indicator_create(netherlands_2006, 'compensation_employees')
I_nl <- leontief_inverse_create(input_coeff_nl)
indirect_effects_create(input_requirements = compensation_indicator,
inverse = I_nl)
And while computing indirect_efects_create() function R gives me an error:
Error in mutate():
mutate()
! Problem while computing ..1 = across(1, gsub(pattern = "_indicator", replacement = "", x = .)).
..1 = across(1, gsub(pattern = "_indicator", replacement = "", x = .))
Caused by error in across():
across()
! .fns must be NULL, a function, a formula, or a list of functions/formulas.
.fns
Run rlang::last_error() to see where the error occurred.
rlang::last_error()
Rlang package gives a bit more information about the error:
rlang::last_trace()
<error/dplyr:::mutate_error>
Backtrace:
x
+-iotables::indirect_effects_create(...)
| -... %>% mutate(across(1, paste0(., "_indirect_effect")))
+-dplyr::mutate(., across(1, paste0(., "_indirect_effect")))
+-dplyr::mutate(...)
-dplyr:::mutate.data.frame(...)
-dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
+-base::withCallingHandlers(...)
-dplyr:::expand_across(dots[[i]])
-dplyr:::across_setup(...)
Solved in 0.9.1.
library(iotables)
library(xlsx)
library(dplyr)
###############################
nl <- netherlands_2006
input_coeff_nl <- input_coefficient_matrix_create(
data_table = netherlands_2006,
households = FALSE)
compensation_indicator <- input_indicator_create(netherlands_2006, 'compensation_employees')
I_nl <- leontief_inverse_create(input_coeff_nl)
indirect_effects_create(input_requirements = compensation_indicator,
And while computing indirect_efects_create() function R gives me an error:
Error in
mutate()
:! Problem while computing
..1 = across(1, gsub(pattern = "_indicator", replacement = "", x = .))
.Caused by error in
across()
:!
.fns
must be NULL, a function, a formula, or a list of functions/formulas.Run
rlang::last_error()
to see where the error occurred.Rlang package gives a bit more information about the error:
<error/dplyr:::mutate_error>
Error in
mutate()
:! Problem while computing
..1 = across(1, gsub(pattern = "_indicator", replacement = "", x = .))
.Caused by error in
across()
:!
.fns
must be NULL, a function, a formula, or a list of functions/formulas.Backtrace:
+-iotables::indirect_effects_create(...)
| -... %>% mutate(across(1, paste0(., "_indirect_effect")))
+-dplyr::mutate(., across(1, paste0(., "_indirect_effect")))
+-dplyr::mutate(...)
-dplyr:::mutate.data.frame(...)
-dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
+-base::withCallingHandlers(...)
-dplyr:::expand_across(dots[[i]])
-dplyr:::across_setup(...)