[adegenet-forum] error in hclust

Thibaut Jombart thibautjombart at gmail.com
Fri Aug 5 13:39:00 CEST 2016


Hi there,

I tried offline - can't reproduce the issue, it works fine for me with:

> R.version
               _
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          3
minor          3.1
year           2016
month          06
day            21
svn rev        70800
language       R
version.string R version 3.3.1 (2016-06-21)
nickname       Bug in Your Hair
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] adegenet_2.0.1  ade4_1.7-4      covr_2.2.0      testthat_1.0.2
[5] knitr_1.13      devtools_1.12.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6       spdep_0.6-6       plyr_1.8.4        LearnBayes_2.15
 [5] tools_3.3.1       boot_1.3-18       digest_0.6.10     memoise_1.0.0
 [9] tibble_1.1        gtable_0.2.0      nlme_3.1-128      lattice_0.20-33
[13] mgcv_1.8-13       Matrix_1.2-6      rex_1.1.1         igraph_1.0.1
[17] shiny_0.13.2.9004 DBI_0.4-1         parallel_3.3.1    coda_0.18-1
[21] cluster_2.0.4     withr_1.0.2       dplyr_0.5.0       stringr_1.0.0
[25] gtools_3.5.0      grid_3.3.1        R6_2.1.2          sp_1.2-3
[29] gdata_2.17.0      ggplot2_2.1.0     reshape2_1.4.1    seqinr_3.3-0
[33] deldir_0.1-12     magrittr_1.5      gmodels_2.16.2    splines_3.3.1
[37] scales_0.4.0      htmltools_0.3.5   MASS_7.3-45       assertthat_0.1
[41] permute_0.9-0     mime_0.5          ape_3.5           colorspace_1.2-6
[45] xtable_1.8-2      httpuv_1.3.3      stringi_1.1.1     lazyeval_0.2.0
[49] munsell_0.4.3     vegan_2.4-0       crayon_1.3.2


If the problem persists on the current version of R and adegenet, please
post an issue and we'll try to reproduce the problem.

Best
Thibaut


--
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology
Imperial College London
https://sites.google.com/site/thibautjombart/
https://github.com/thibautjombart
Twitter: @TeebzR <https://twitter.com/TeebzR>

On 5 August 2016 at 11:35, Mark Coulson <Mark.Coulson.ic at uhi.ac.uk> wrote:

> Ok,
>
>
>
> So got it working now by omitting the D <- as.matrix(X) step and running
> the hclust only from the D <- dist(X)
>
>
>
> M
>
>
>
>
>
> *From:* Thibaut Jombart [mailto:thibautjombart at gmail.com]
> *Sent:* 05 August 2016 10:41
> *To:* Mark Coulson <Mark.Coulson.ic at uhi.ac.uk>
> *Cc:* adegenet-forum at lists.r-forge.r-project.org
> *Subject:* Re: [adegenet-forum] error in hclust
>
>
>
> Odd indeed. Are there any NAs in 'X'?
>
>
>
> Cheers
>
> Thibaut
>
>
>
> --
> Dr Thibaut Jombart
> Lecturer, Department of Infectious Disease Epidemiology
>
> Imperial College London
> https://sites.google.com/site/thibautjombart/
>
> https://github.com/thibautjombart
>
> Twitter: @TeebzR <https://twitter.com/TeebzR>
>
>
>
> On 5 August 2016 at 10:34, Mark Coulson <Mark.Coulson.ic at uhi.ac.uk> wrote:
>
> Hello,
>
>
>
> Yesterday I ran  the following code and everything worked just fine. Today
> I simply opened up my script and re-ran it and got the following
>
>
>
> laidon <- import2genind("laidon_project_data_no_sibs.str")
>
> X <- tab(laidon, freq=TRUE, NA.method="mean")
>
>
>
> D <- dist(X)
>
> D <- as.matrix(D)
>
>
>
> h1 <- hclust(D, method="complete")
>
>
>
> Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed
> 65536") :
>
>   missing value where TRUE/FALSE needed
>
>
>
> Not sure what this error means but more confused as to why suddenly it
> isn’t working. Nothing else has changed
>
>
>
> Mark
>
> Inverness College UHI, a partner in the University of the Highlands and
> Islands www.inverness.uhi.ac.uk Board of Management of Inverness College
> (known as Inverness College UHI), Scottish Charity No SC021197.
>
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/
> listinfo/adegenet-forum
>
>
> Inverness College UHI, a partner in the University of the Highlands and
> Islands www.inverness.uhi.ac.uk Board of Management of Inverness College
> (known as Inverness College UHI), Scottish Charity No SC021197.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160805/36a2c5d4/attachment.html>


More information about the adegenet-forum mailing list