Description Usage Arguments Examples
Turn object to diatech JSON. See specific method
1 2 | ## S3 method for class 'diaClassificationList'
as.diaJson(cls, mes, nb, ...)
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.