plotstruct {phyclust} | R Documentation

## Struct Plots of Observations Based on Posterior Probabilities

### Description

This function provides structure plots of data set given based on posterior probabilities, the `Z.normalized` matrix.

### Usage

    plotstruct(Z, X.class = NULL, sort.inside.class = TRUE,
        direction = "h", main = "Structure Plot", xlab = "Observations",
        ylab = "Posterior Probabilities", ...)

### Arguments

`Z` | a Z matrix as Z.normalized in `Class phyclust`.
`X.class` | class ids indicated for all observations
`sort.inside.class` | sort observations inside class by max posteriors.
`direction` | either "h" for horizontal or "v" for vertical.
`main` | main label, default = "Structure Plot".
`xlab` | x-axis label, default = "Observations".
`ylab` | y-axis label, default = "Posterior Probabilities".
`...` | other options passed to `plot`.

### Details

The posterior probabilities in `ret.phyclust$Z.normalized` will be drawn in colors.

If `X.class` is submitted, the plot will draw in the order of class ids and the `sort.inside.class` will be skipped.

### Value

A structure plot will be drawn.

### Author(s)

Wei-Chen Chen wccsnow@gmail.com

### References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

### See Also

`phyclust`, `find.best`, `plotdots`.

### Examples

    ## Not run:
    library(phyclust, quiet = TRUE)

    set.seed(1234)
    ret.1 <- phyclust(seq.data.toy$org, 3)
    plotstruct(ret.1$Z.normalized)
    windows()
    plotstruct(ret.1$Z.normalized, sort.inside.class = FALSE)

    # With class ids
    X.class <- as.numeric(gsub(".*-(.*)", "\\1", seq.data.toy$seqname))
    windows()
    plotstruct(ret.1$Z.normalized, X.class = X.class)

    ## End(Not run)

[Package phyclust version 0.1-25 Index]