On the example code:
x <- rbind(c(rep(0,15),rep(1,5)),c(rep(0,15),rep(1,5)),c(rep(0,19),1),c(rep(1,5),rep(0,15)))
rownames(x) <- letters[1:4]
d <- distGPS(x,metric='tanimoto')
If I have non 0 or 1 values in the matrix, distGPS gives error message. Why do we have this restriction?
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE 13.1 (Bottle) (x86_64)
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=en_GB.UTF-8
[9] LC_ADDRESS=en_GB.UTF-8 LC_TELEPHONE=en_GB.UTF-8
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] cluster_2.0.6 chroGPS_1.22.0 changepoint_2.2.2
[4] zoo_1.8-1 Biobase_2.34.0 GenomicRanges_1.26.4
[7] GenomeInfoDb_1.10.3 IRanges_2.8.2 S4Vectors_0.12.2
[10] BiocGenerics_0.20.0 BiocInstaller_1.24.0 MASS_7.3-49
[13] smacof_1.9-6 plotrix_3.7 xlsx_0.5.7
[16] xlsxjars_0.6.1 rJava_0.9-9 rpart_4.1-13
[19] survivalsvm_0.0.5 survival_2.41-3 e1071_1.6-8
loaded via a namespace (and not attached):
[1] splines_3.3.3 ellipse_0.4.1 gtools_3.5.0
[4] ICSNP_1.1-0 Formula_1.2-2 latticeExtra_0.6-28
[7] slam_0.1-40 backports_1.1.2 lattice_0.20-35
[10] quantreg_5.35 quadprog_1.5-5 heplots_1.3-4
[13] digest_0.6.15 XVector_0.14.1 RColorBrewer_1.1-2
[16] checkmate_1.8.5 minqa_1.2.4 colorspace_1.3-2
[19] survey_3.33 htmltools_0.3.6 Matrix_1.2-12
[22] plyr_1.8.4 weights_0.85 SparseM_1.77
[25] zlibbioc_1.20.0 mvtnorm_1.0-7 scales_0.5.0
[28] gdata_2.18.0 DPpackage_1.1-7.4 lme4_1.1-15
[31] pracma_2.1.4 MatrixModels_0.4-1 htmlTable_1.11.2
[34] tibble_1.4.2 mgcv_1.8-23 car_2.1-6
[37] ggplot2_2.2.1 nnet_7.3-12 lazyeval_0.2.1
[40] pbkrtest_0.4-7 magrittr_1.5 mice_2.46.0
[43] nlme_3.1-131.1 foreign_0.8-69 class_7.3-14
[46] tools_3.3.3 data.table_1.10.4-3 stringr_1.3.0
[49] munsell_0.4.3 rlang_0.2.0 RCurl_1.95-4.10
[52] candisc_0.8-0 grid_3.3.3 nloptr_1.0.4
[55] htmlwidgets_1.0 bitops_1.0-6 base64enc_0.1-3
[58] gtable_0.2.0 polynom_1.3-9 gridExtra_2.3
[61] nnls_1.4 knitr_1.20 Hmisc_4.1-1
[64] stringi_1.1.6 Rcpp_0.12.15 ICS_1.3-1
[67] acepack_1.4.1 wordcloud_2.5