Description Usage Arguments Details Author(s) See Also Examples
Aggregate industries ISIC Rev. 3 and ISIC Rev. 4
listMissInd
: for each missing aggregate, list missing industries. Return NULL if all industries are missing for an aggregate
1 2 3 4 5 |
data |
a dataframe having STAN industry labels (ISIC Rev. 3 or ISIC Rev. 4) as column names. |
isic |
an integer specifying the ISIC classification of data sources. |
cumulative |
logical to cumulate values if aggregate already existing in data. |
naAsZero |
character vector to specify industries where NAs are treated as zero, |
fill2D |
logical add column with NA or zero for each missing 2-digit industry |
missing.2d |
character vector with industries to impute zero, |
part |
logical industry codes in column names contain partial information, e.g. |
Calculate STAN ISIC Rev. 3 aggregates based on the A60 list and STAN ISIC Rev. 4 aggregates based on the A88 list.
listMissInd(data, isic)
OECD STAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## ISIC Rev. 3:
x <- data.frame("cou"="JPN",
"year"=c(rep(1995, 4), rep(1996,4)),
"ind"=c("C01", "C02", "C05", "C10"),
"value"=c(10, 10, 10, 10))
data <- dcast(x,cou + year ~ ind, value.var='value')
data.agg <- indAggregate(data=data, isic=3)
## ISIC Rev. 4:
x <- data.frame("cou"="JPN",
"year"=c(rep(1995, 4), rep(1996,4)),
"ind"=c("D01", "D02", "D03", "D05"),
"value"=c(10, 10, 10, 10))
data <- dcast(x,cou + year ~ ind, value.var='value')
data.agg <- indAggregate(data=data, isic=4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.