# NOT RUN {
library(cartograflow)
data(flowdata)
bkg<- system.file("shape/MGP_TER.shp", package="cartograflow",
lib.loc = NULL, mustWork = TRUE)
tab<-flowjointure(flows,bkg,"EPT_NUM")
#Example for reducing a flow matrice with a distance matrice, in long format (i,j, distance)
##1/2: Computes the matrice distances
tab.distance<-flowdist(tab, dist.method = "euclidian",result = "dist")
##2/2: Reduce the flow matrice
tab.flow<-flowreduct(tab,tab.distance, metric = "continous",
select = "dmax", #maximum distance travelled criterion
d = 8567) #maximum distance value
# }
Run the code above in your browser using DataLab