Skip to content

Commit 3648105

Browse files
committed
revert variable col name
1 parent ba8ea6f commit 3648105

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

R/LoadMargins.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ getMarginsTable <- function (model) {
1717
# Change in inventory has negative margins for positive change, which does not accurately portray actual margins either.
1818
purchaser_removal <- sapply(list("Export", "Import", "ChangeInventories"), getVectorOfCodes,
1919
ioschema = model$specs$BaseIOSchema, iolevel = "Detail")
20-
# column names from Margins Tables from 2012 schema were not fixed
21-
col <- ifelse("NIPACode" %in% names(MarginsTable), "NIPACode", "IndustryCode")
22-
MarginsTable <- MarginsTable[!MarginsTable[[col]] %in% purchaser_removal,]
20+
MarginsTable <- MarginsTable[!MarginsTable$IndustryCode %in% purchaser_removal,]
2321
# Remove Scrap, Used and secondhand goods, and Non-comparable imports, and Rest of world adjustment commodities
2422
commodity_removal <- sapply(list("Scrap", "UsedGoods", "NonComparableImport", "RoWAdjustment"), getVectorOfCodes,
2523
ioschema = model$specs$BaseIOSchema, iolevel = model$specs$BaseIOLevel)

0 commit comments

Comments
 (0)