flowdist: Compute continous distance matrix from geographical...

Description Usage Arguments Details Value Examples

View source: R/flowdist.R

Description

From a geographical background computes (and threshold) a distance matrix.

Usage

1
flowdist(tab, dist.method, result)

Arguments

tab

the input flow dataset.

dist.method

euclidian calculation

result

take the vallue "flowdist" or "dist" allows to parameter the resulting distance dataset (flows filtered by a distance criterion or not)

Details

– result = "dist" is the resulting tab of the distance
– result = "flowdist" with all the calculated parameters

Value

(1) A flowdata set with continuous euclidian distances calculations, see dist.method parameter

(2) A flowdata set with movement from euclidian distances calculations.

(3) A flowmap filtered by a global distance criterion.

Examples

1
2
3
4
5
6
7
8
9
library(cartograflow)
data(flowdata)
bkg<- system.file("shape/MGP_TER.shp", package="cartograflow",
                  lib.loc = NULL, mustWork = TRUE)
tab<-flowjointure(flows,bkg,"EPT_NUM")
#Format long with only origin, destination and distance parameters:
tab.distance<-flowdist(tab, dist.method = "euclidian",result = "dist")
#Format long with with all parameters: coordinates, distance, mouvement
tab.distance<-flowdist(tab, dist.method = "euclidian",result = "flowdist")

fbahoken/cartogRaflow documentation built on May 21, 2019, 1:43 p.m.