recluster.rotate {recluster} | R Documentation |
Rotates a bidimensional configuration according to a line
Description
This function rotates the points of a configuration to a new configuration where a line identified by its intercept and its angular coefficient is rotated to become horizontal. The function can also flip or centre a configuration
Usage
recluster.rotate(table,m=FALSE,q=FALSE,flip="none",centre=TRUE)
Arguments
table |
The bidimensional configuration. |
m |
The line slope. |
q |
The line intercept |
flip |
The kind of flip, no flip, "none"; "hor", flip horizontally; "ver", flip vertically; "both", flip vertically and horizontally. |
centre |
A logical. If TRUE the configuration, after transformation is centered to the mean X and Y values. |
Value
table2 |
The transformed bidimensional configuration. |
Author(s)
Leonardo Dapporto
References
Dapporto L., Voda R., Dinca V., Vila R. "Comparing population patterns for genetic and morphological markers with uneven sample sizes. An example for the butterfly Maniola jurtina" Methods Ecol Evol (2014), 5, 834-843.
Examples
data(dataisl)
#Compute bidimensional representation for islands
pcoa<-cmdscale(recluster.dist(dataisl))
plot (pcoa)
#Compute the line
lin<-recluster.line(pcoa)
transf<-recluster.rotate(pcoa,m=lin$m,q=lin$q)
plot(transf)