AddStatistics | R Documentation |
Function to evaluate statistics at LMA level based on data at community level.
AddStatistics(statData, comID.file, lma, comID.lma)
statData |
data.frame or data.table containing the ID of the communities and the numerical variables to be summed at LMA level. |
comID.file |
character: name of the variable containing the community ID in the statData object. |
lma |
list of three data.tables: clusterList, LWClus and marginals. See function findClusters. |
comID.lma |
character: name of the variable containing the community ID in the lma object. |
This function can be used in general to compute several statistics at LMA level provided data at community level is provided. This function sums the values at community level to obtain the corresponding value at LMA level.
data.table containing the LMA ID and the summed numerical variables from statData.
Daniela Ichim, Luisa Franconi
# compute population totals at LMA level from population values at community level.
## Not run:
out<- findClusters(LWCom=Brindisi, minSZ=1000,minSC=0.6667,tarSZ=10000,tarSC=0.75,
verbose=TRUE)
AddStatistics(shpBrindisi[,c("PRO_COM","POP2001")], "PRO_COM",out$lma,"community" )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.