refine {optpart} | R Documentation |
Refining a Classification by Re-Assigning Memberships
Description
Refine allows you to re-assign specific elements of a classification from one class or cluster to another. In the default case, you simply interactively enter sample IDs and give a new cluster assignment. For PCO and NMDS ordinations, you do the assignments with a mouse.
Usage
## Default S3 method:
refine(comm,clustering,...)
## S3 method for class 'dsvord'
refine(x,clustering,ax=1,ay=2,...)
Arguments
comm |
a community data.frame |
x |
an ordination of class ‘dsvord’ |
clustering |
a clustering identity or membership vector |
ax |
the X axis of the ordination |
ay |
the Y axis of the ordination |
... |
ancillary arguments to allow differing numbers of arguments |
Value
a list object of class ‘clustering’ with one component.
clustering |
a numeric vector giving the cluster assignment for each sample |
Note
There are many, many ways to produce classifications in R, including several in package ‘optpart’. refine is designed to take one of these classifications and polish it by making relatively few transfers. The ordination-based routines allow visual assessment of cluster validity, although in reduced dimensionality, which can be misleading.
Author(s)
David W. Roberts droberts@montana.edu
References
http://ecology.msu.montana.edu/labdsv/R
Examples
## Not run: data(shoshveg)
## Not run: dis.bc <- dsvdis(shoshveg,'bray')
## Not run: opt.5 <- optpart(5,dis.bc)
## Not run: nmds.bc <- nmds(dis.bc)
## Not run: plot(nmds.bc)
## Not run: res <- refine(nmds.bc,opt.5)