Compute the revealed comparative advantage (RCA) index balassa1965tradepecan for a given dataset.
rca(
data,
binary = TRUE,
threshold = 1,
econ = "economy",
prod = "product",
exp = "export"
)An economy-by-product matrix with the RCA values.
A data frame or matrix containing the data.
If a data frame, it should have columns representing economies, products, and export values.
If a matrix, it should be an economy-by-product matrix with export values.
A boolean (default = TRUE) specifying whether to return binary RCA values (1 if RCA >= threshold, 0 otherwise).
A numeric value (default = 1) specifying the threshold for binary RCA values.
A character string (default = "economy") specifying the column
name for economies when data is a data frame.
A character string (default = "product") specifying the column
name for products when data is a data frame.
A character string (default = "export") specifying the column name
for export values when data is a data frame.