sp_clust_explorer: Classification result explorer

View source: R/shinyapp.R

sp_clust_explorerR Documentation

Classification result explorer

Description

Start a local Shiny App to explore the results of a classification

Usage

sp_clust_explorer(
  object = NULL,
  spatial = NULL,
  membership = NULL,
  dataset = NULL,
  port = 8100,
  ...
)

Arguments

object

A FCMres object, typically obtained from functions CMeans, GCMeans, SFCMeans, SGFCMeans

spatial

A feature collection (sf) used to map the observations. Only needed if object was not created from rasters.

membership

A matrix or a dataframe representing the membership values obtained for each observation. If NULL, then the matrix is extracted from object.

dataset

A dataframe or matrix representing the data used for the classification. If NULL, then the matrix is extracted from object.

port

An integer of length 4 indicating the port on which to start the Shiny app. Default is 8100

...

Other parameters passed to the function runApp

Examples

## Not run: 
data(LyonIris)

#selecting the columns for the analysis
AnalysisFields <-c("Lden","NO2","PM25","VegHautPrt","Pct0_14",
                   "Pct_65","Pct_Img","TxChom1564","Pct_brevet","NivVieMed")

#rescaling the columns
Data <- sf::st_drop_geometry(LyonIris[AnalysisFields])
for (Col in names(Data)){
  Data[[Col]] <- as.numeric(scale(Data[[Col]]))
}

Cmean <- CMeans(Data,4,1.5,500,standardize = FALSE, seed = 456, tol = 0.00001, verbose = FALSE)

sp_clust_explorer(Cmean, LyonIris)

## End(Not run)

geocmeans documentation built on Sept. 12, 2023, 9:06 a.m.