joinAQuadtrees {AQuadtree} | R Documentation |
Join two AQuadtree objects from the same area, to compare their data
Description
Given two objects of class AQuadtree for the same area, wich, for instance,
may contain data from two different periods, joinAQuadtrees
returns a new object of class AQuadtree with the common zones at the lowest
shared level, summarising the data from both AQuadtrees.
Usage
joinAQuadtrees(qt1, qt2, withResiduals = FALSE, mean.1 = NULL, mean.2 = NULL)
Arguments
qt1 |
object of class "AQuadtree" containing the first object to join. |
qt2 |
object of class "AQuadtree" containing the second object to join. |
withResiduals |
logical indicating if |
mean.1 |
character or character vector specifying the columns in the
first AQuadtreeto which a weighted mean should be computed. By default
the aggregation function used is |
mean.2 |
character or character vector specifying the columns in the
first AQuadtreeto which a weighted mean should be computed. By default
the aggregation function used is |
Details
The function joinAQuadtrees
creates a new AQuadtree object from two
given AQuadtree objects with data from the same area. The data of the
two given objects is summarised at the smallest possible cells shared by
both given objects. All the input data is maintained on the new created
object. This function can be used to join the different attributes from
the same area or information from different periods.
Value
AQuadtree with the information of the two given objects summarised at the lowest level shared by both objects.
Examples
data("CharlestonPop")
CharlestonPop.AQT_1<-AQuadtree(CharlestonPop, layers = 2)
CharlestonPop.AQT_2<-AQuadtree(CharlestonPop, colnames="sex",
thresholdField=c("sex.male", "sex.female"), layers = 2)
CharlestonPop.AQT_1_2<-joinAQuadtrees(CharlestonPop.AQT_1, CharlestonPop.AQT_2)
## Not run:
## non AQuadtree objects
joinAQuadtrees(CharlestonPop, CharlestonCensusTracts)
## End(Not run)