Skip to contents

Create a ridge plot (requires package ggridges)

Usage

plotRN_phaseDensities(
  phaseOutput,
  plotCentroid = NA,
  showEpochLegend = TRUE,
  epochColours = NULL,
  epochLabel = "Phase",
  excludeTransients = FALSE,
  excludePhaseNeighbours = FALSE,
  excludeSingularities = TRUE,
  excludeNonrecurring = TRUE,
  excludeVars = "",
  excludePhases = "",
  alphaDensity = 0.4,
  splitFacets = NA,
  showPhaseSize = TRUE,
  returnGraph = FALSE
)

Arguments

phaseOutput

Output from function rn_phaseInfo

excludeTransients

Should the category "Transient" be excluded from plots? (default = FALSE)

excludeSingularities

Should the category "Singularity" be excluded from plots? (default = TRUE)

excludeNonrecurring

Should the category "Nonrecurring" be excluded from plots? (default = TRUE)

excludeVars

Exclude specific dimension variables by name. Leave empty to include all variables (default = "")

excludePhases

Exclude Phases by their name (variable phase_name). Leave empty to include all Phases (after the other exclusion arguments) (default = "")

alphaDensity

Alpha value for the density plots

splitFacets

Integer value to indicate if sets of phases should be displayed in different facets? (default = NA)

showPhaseSize

Show the number of states in each phase in the labels (default = TRUE)

excludePhaseNeighbour

Should the category "PhaseNH" be excluded from plots? (default = FALSE)

Value

data frame with phase series.

Examples


RN <- rn(cumsum(rnorm(100)), emDim = 1, emLag = 1, emRad = NA, weighted = TRUE)
#> Set `weightedBy` to 'si' due to the value of `weighted`
outPhases <- rn_phaseInfo(RN)
#> 
#> ~~~o~~o~~casnet~~o~~o~~~
#> 
#> Recurring states with high similarity will be considered a phase:
#> 
#> selectionMethod = degree
#> maxPhases = 100
#> minStatesinPhase = 2
#> maxStatesinPhase = 100
#> inverseWeight = TRUE
#> 
#> Recurring states will be grouped as a 'Phase ##', as transients (unstable phases) 'Transient ##', phase neighbours (state connects to more than 1 identified phase) 'PhaseNH ##', singularities (state recurs less often than minStatesinPhase) 'Singularity', or as not recurring 'Nonrecurring'.
#> 
#> ~~~o~~o~~casnet~~o~~o~~~
#> 
#> Found 18 phases with at least 2 states.
plotRN_phaseDensities(outPhases)
#> Error in plotRN_phaseDensities(outPhases): object 'out' not found