View source: R/ReplaceDimList.R
ReplaceDimList | R Documentation |
Replace list elements of sdcTable coded hierarchies. Replacement elements can be sdcTable coded or TauArgus coded.
ReplaceDimList(dimList, replaceList, total = "Total")
dimList |
Named list of data frames (sdcTable coded) |
replaceList |
Named list where elements are data frames (sdcTable coded) or character vectors (TauArgus coded) |
total |
String used to name totals when TauArgus coded input |
Updated dimList where some or all elements are replaced
# First generate dimLists dimListA <- FindDimLists(SSBtoolsData("sprt_emp_withEU")[, c("geo", "eu", "age")]) dimListB <- FindDimLists(SSBtoolsData("sprt_emp_withEU")[, c("geo", "age")]) dimListC <- FindDimLists(SSBtoolsData("sprt_emp_withEU")[, c("geo", "eu")]) # dimListA1 and dimListA are identical dimListA1 <- ReplaceDimList(dimListB, dimListC) identical(dimListA, dimListA1) # replaceList can be TauArgus coded hcrC <- DimList2Hrc(dimListC) # dimListA2 and dimListA are identical dimListA2 <- ReplaceDimList(dimListB, hcrC) identical(dimListA, dimListA2) # Also possible when duplicated names ReplaceDimList(FindDimLists(EasyData("z3")[, -7]), FindDimLists(EasyData("z2")[, -5]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.