spatdt: Spatial Data Handling

Description Usage Arguments Value Examples

View source: R/FLR.r

Description

Creates a linear connection between spatial data in order to be used for classification.

Usage

1
2
3
4
5
  spatdt(data,idx,mat,pre_order=0,snd=0)
  get.cost(zzz,mat)
  get.cost2(pre_order,mat)
  get.pos(instz)
  winner.route(cost)

Arguments

data

an input data.frame

idx

indicates the position of the spatial data attribute.

mat

a matrix indicating distances

pre_order

predefined order

snd

indicates which node will be used as the starting one. The default value 0 means that the best route will be chosen, without taking into consideration which the starting node will be.

zzz

a route

instz

instance

cost

cost of routes

Value

return a list of 3 objects: a) The modified dataset, b) winner route, c) the total distance of the route.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Import data
data(dataset001)
data<-dataset001
data(mat)

idx<-1
rhoa<-0.6
param<-"sigmoid"
pre_order<-c(1,2,3,4,5,6,7,8,9)

#Data preprocess
data<-spatdt(data,idx,mat,pre_order)

FLR documentation built on May 2, 2019, 3:43 p.m.

Related to spatdt in FLR...