inst/doc/somspace.R

## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, eval = F)

## -----------------------------------------------------------------------------
#  library(somspace)
#  str(owda)

## -----------------------------------------------------------------------------
#  inp <- sominp(owda) #depending on data set size may take some time

## -----------------------------------------------------------------------------
#  str(inp)

## -----------------------------------------------------------------------------
#  my_som <- somspa(inp)

## -----------------------------------------------------------------------------
#  str(somsp)

## -----------------------------------------------------------------------------
#  my_som <- somspa(inp, grid = somgrid(6, 6), rlen = 1000)

## -----------------------------------------------------------------------------
#  plot(my_som)
#  summary(my_som)

## -----------------------------------------------------------------------------
#  plot_ts(my_som, 12)
#  plot_ts(my_som, c(1, 12, 21, 39))
#  plot_ts(my_som, 1:max(my_som$summary$node)) #plots all soms

## -----------------------------------------------------------------------------
#  my_regions <- somregs(my_som, 12)
#  my_regions <- somregs(my_som, 17, method = "ward.D2")

## -----------------------------------------------------------------------------
#  plot(my_regions, c(2, 5, 9, 13), 2, 2)
#  plot_ts(my_regions, 2)

## -----------------------------------------------------------------------------
#  cnet(my_regions, 12, 0.3)

Try the somspace package in your browser

Any scripts or data that you put into this service are public.

somspace documentation built on April 29, 2023, 1:11 a.m.