Hi,

On Wed, Mar 14, 2012 at 2:21 PM, Dorothea Hill
<dorothea.h...@zoo.ox.ac.uk> wrote:
> Hi,
>
> I am trying to use a mantel test on two distance matrices. The code I have 
> entered for each is:
>
> Gen_dists <- read.csv(file.choose(),
>                                                stringsAsFactors = FALSE,
>                                                na.strings = c(" "),
>                                                fill = T,
>                                                header = FALSE,
>                  blank.lines.skip = FALSE)
>
> Gen_matrix <- as.matrix(Gen_dists)
>
> mantel.test(Geo_matrix, Gen_matrix, nperm = 999, graph = T, alternative = 
> "great")
>
> I am getting a result but with lots of warning messages :
> "Warning: non-square matrix"
>
> However, my matrices are square!

Not according to R. Somewhere in the import or modification steps they
have become unsquare. Since you provide neither a reproducible example
nor any description of your matrices -- str() and dim() seem
particularly relevant -- we can't possibly tell you where.

Sarah


-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to