Learn R Programming

concordance (version 1.6)

listSigma: listSigma

Description

listSigma is used to return trade elasticities (import demand elasticities) for a list of product, separating elasticities for each product in the list.

Usage

listSigma(sourcevar, origin, country="USA", use_SITC=FALSE)

Arguments

sourcevar

Vector which contains the codes to be converted

origin

Coding scheme of origin (name enclosed in quotes "")

country

Country for which to return import demand elasticity (default=USA)

use_SITC

Set to TRUE if you wish to look up elasticities via SITC instead of HS. Only available for the US.

Value

Concords given list of codes to list of SITC3 codes (for the US) or 3-digit HS3 codes (for other countries), then uses this as input to concord to import demand elasticities. Unlike sigma, differentiates between codes corresponding to different codes in input vector.

Details

Works by calling sigma using lapply.

For further documentation re: input parameters see documentation for sigma.

Examples

Run this code
# NOT RUN {
listSigma(c("100","010"), "HS", "USA")
# Returns [[1]]
# [1]  2.6  2.3  4.2  1.4  9.6 11.6  2.1  7.1  3.9  1.8 15.9  5.7  1.6  2.7  5.7
# [16]  2.0  1.7  4.4  1.5  4.4  2.0  2.7  3.4
#
# [[2]]
# [1] 1.4
# }

Run the code above in your browser using DataLab