sp_clust_explorer | R Documentation |
Start a local Shiny App to explore the results of a classification
sp_clust_explorer(
object = NULL,
spatial = NULL,
membership = NULL,
dataset = NULL,
port = 8100,
...
)
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 |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.