recluster.rotate: Rotates a bidimensional configuration according to a line

Description Usage Arguments Value Author(s) References Examples

View source: R/recluster.rotate.R

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

1
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

1
2
3
4
5
6
7
8
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)

recluster documentation built on July 27, 2020, 1:15 a.m.