R: Refining a Classification by Re-Assigning Memberships
refine
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(x,clustering,...)
## S3 method for class 'nmds'
refine(x,clustering,ax=1,ay=2,...)
## S3 method for class 'pco'
refine(x,clustering,ax=1,ay=2,...)
Arguments
x
a taxon dataframe or an ordination of class ‘PCO’ or ‘NMDS’
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.
## 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)