Symmetrically remove columns with only zero values or with missing values.
Value
A tibble/data.frame with a key row and a symmetric matrix, after removing all empty columns and rows at the same time.
Examples
test_table <- input_coefficient_matrix_create(iotable_get(source = "germany_1995"))
test_table[, 2] <- 0
empty_remove (test_table)
#> Columns and rows of agriculture_group are all zeros and will be removed.
#> iotables_row industry_group construction trade_group
#> 2 industry_group 0.282166963 0.261259904 0.076068903
#> 3 construction 0.006794226 0.015777302 0.009806263
#> 4 trade_group 0.067365111 0.057775462 0.137759854
#> 5 business_services_group 0.089041045 0.126328347 0.121754314
#> 6 other_services_group 0.013883047 0.007113018 0.020784612
#> business_services_group other_services_group
#> 2 0.01730141 0.05965598
#> 3 0.03387356 0.01798915
#> 4 0.01564650 0.04127973
#> 5 0.27895975 0.06724659
#> 6 0.02174481 0.04336651