AddStatistics {LabourMarketAreas} | R Documentation |
AddStatistics
Description
Function to evaluate statistics at LMA level based on data at community level.
Usage
AddStatistics(statData, comID.file, lma, comID.lma)
Arguments
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. |
Details
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.
Value
data.table containing the LMA ID and the summed numerical variables from statData.
Author(s)
Daniela Ichim, Luisa Franconi
Examples
# 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)