as.diaJson.diaClassificationList: Turn object to diatech JSON

Description Usage Arguments Examples

View source: R/toJson.R

Description

Turn object to diatech JSON. See specific method

Usage

1
2
## S3 method for class 'diaClassificationList'
as.diaJson(cls, mes, nb, ...)

Arguments

nb

list with the neighbouring polygons. Gotten from the function generateMaps in this package.

...

other paramters passing to methods.

x

object to be turned into JSON.

labels

data.frame containg the id column and extra variables to be added to the JSON.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 

library(diaMeasures)

data(bourciezDiaData)

set <- bourciezDiaData$lonlat

measure <- getMeasures(set, 'euclidean')
classification <- getClassification(measure, 'classic', 'Med', '107', 2:4)
result <- as.diaJson(classification, measure)

## statistics

measure <- getMeasures(set, 'euclidean')
stat <- getStatistic(measure, stat = 'sd')
classification <- getClassification(stat, 'classic', 'Med', 2:4)
json <- as.diaJson(classification, stat)

## with boundary

classification <- getClassification(measure, 'classic', 'Med', '107', 2:4, nb = bourciezDiaData$nb)
json <- as.diaJson(classification, bourciezDiaData$nb)


## End(Not run)

usobiaga/diatechServer documentation built on May 3, 2019, 2:38 p.m.