R Under development (unstable) (2024-05-12 r86534 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > ############################### CLR #################################### > # Calculates clr-transformation. Should be equal. > > # Test data > # data(varespec) > testdata <- matrix(round(runif(1000, 0, 100)), nrow=20) > testdata <- testdata - 50 > testdata[testdata < 0] <- 0 > rownames(testdata) <- paste0("row", seq_len(nrow(testdata))) > colnames(testdata) <- paste0("col", seq_len(ncol(testdata))) > testdata.with.pseudo <- testdata + 1 > > # Calculates relative abundance table > relative <- vegan::decostand(testdata, "total") > relative.with.pseudo <- vegan::decostand(testdata+1, "total") > > # CLR data > x.clr <- vegan::decostand(testdata+1, method = "clr") > x.rclr <- vegan::decostand(testdata, method = "rclr") > x.clr.pseudo <- vegan::decostand(testdata, method = "clr", pseudocount=1) > > max(abs(x.clr - x.clr.pseudo))<1e-6 [1] TRUE > max(abs(vegan::decostand(testdata+1, method = "clr", pseudocount=0)-x.clr.pseudo))<1e-6 [1] TRUE > > # Tests clr > alt.clr <- t(apply(as.matrix(relative.with.pseudo), 1, FUN=function(x){ + log(x) - mean(log(x))})) > max(abs(x.clr-alt.clr)) < 1e-6 [1] TRUE > all((x.rclr==0) == (testdata==0)) [1] TRUE > > # Expect that error does not occur > vegan::decostand(testdata, method = "rclr") col1 col2 col3 col4 col5 col6 row1 -0.1946357 0.3061395 0.00000000 -2.09175573 0.0000000 0.2436192 row2 0.0000000 0.0000000 0.00000000 -1.84183606 0.0000000 0.4268475 row3 0.5335143 0.0000000 -0.01010110 0.94967474 0.0000000 -0.5978878 row4 -0.6241622 0.0000000 0.00000000 0.61755098 0.0000000 0.0000000 row5 -1.2934907 0.7433912 0.00000000 0.00000000 0.3159472 -0.1948784 row6 0.0000000 -0.9068992 0.00000000 0.61292656 0.0000000 0.0000000 row7 0.0000000 0.4359688 0.00000000 0.00000000 0.4649564 0.3753442 row8 0.0000000 -0.7271329 0.00000000 0.00000000 0.0000000 0.0000000 row9 0.0000000 0.0000000 0.00000000 0.30809527 -1.7287867 0.0000000 row10 0.0000000 0.0000000 0.00000000 0.00000000 0.0000000 0.2695430 row11 0.3854668 0.0000000 -0.00657527 0.00000000 0.2710565 0.0000000 row12 0.5447066 0.0000000 0.91738186 0.00000000 0.0000000 -0.6920561 row13 0.0000000 0.2771179 0.75157589 0.00000000 -1.6687922 0.4712739 row14 0.4852859 0.7264480 -0.12084988 0.83892597 0.0000000 0.0000000 row15 0.6739010 0.0000000 -0.17339684 -1.55969120 0.4771907 0.0000000 row16 0.2250968 0.4846080 0.14813580 0.00000000 0.1073138 0.0000000 row17 -0.9548824 0.0000000 0.00000000 -0.50289732 0.7880869 0.0000000 row18 0.3465060 -1.4113519 0.23730671 0.15726401 -0.1875765 0.0000000 row19 0.0000000 0.0000000 0.00000000 -0.01007489 -2.6127646 -0.2148693 row20 0.9523305 0.0000000 -1.55319543 0.00000000 -0.2314396 0.0000000 col7 col8 col9 col10 col11 col12 row1 0.0000000 0.0000000 -0.41777929 0.0000000 0.00000000 0.0000000 row2 -0.1072350 -2.9404483 0.00000000 0.1040741 0.05528393 0.7231133 row3 -0.9545627 0.0000000 -0.82103132 -0.1924227 0.73711330 0.2775810 row4 0.5950781 0.0000000 -0.19337924 0.4484746 0.00000000 0.0000000 row5 0.0000000 0.0000000 0.78595085 0.0000000 -0.25203682 0.0000000 row6 0.0000000 0.0000000 -2.85280935 0.0000000 0.47939516 0.0000000 row7 0.3753442 0.0000000 -1.48095377 -1.4809538 0.78080933 0.0000000 row8 0.5256301 0.0000000 0.00000000 0.0000000 0.00000000 0.0000000 row9 0.7279491 0.0000000 0.69896158 0.9338012 -0.63017437 0.0000000 row10 0.8348568 0.0000000 0.00000000 0.1417096 0.09518957 0.0000000 row11 0.0000000 0.0000000 -0.22971882 0.0000000 0.00000000 0.0000000 row12 0.0000000 0.4780152 0.00000000 0.0000000 0.00000000 0.8949090 row13 0.6337929 0.0000000 0.72910303 -0.4160293 0.50026146 0.0000000 row14 0.7954409 0.0000000 -0.93178009 0.0000000 -1.21946216 0.0000000 row15 0.0000000 0.0000000 0.00000000 0.0000000 -0.01924616 0.0000000 row16 0.0000000 0.0000000 -0.07500776 0.0000000 0.61813943 0.0000000 row17 0.5331946 0.0000000 0.00000000 0.0000000 0.00000000 0.0000000 row18 0.0000000 0.0000000 0.00000000 0.6927822 0.00000000 0.0000000 row19 0.0000000 0.5227296 0.00000000 0.0000000 0.00000000 0.0000000 row20 0.0000000 0.0000000 0.00000000 0.5570178 0.00000000 -0.2314396 col13 col14 col15 col16 col17 col18 row1 0.0000000 0.52320405 0.5938216 0.00000000 0.00000000 0.06772852 row2 0.0000000 0.79722127 -0.5425531 0.49353886 0.00000000 0.49353886 row3 0.5960347 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 row4 0.3662365 0.17818432 0.0000000 -0.14458908 -1.80281715 0.61755098 row5 0.2469543 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 row6 -0.2137520 0.00000000 0.0000000 0.54838804 0.00000000 0.51448648 row7 0.0000000 0.00000000 0.0000000 0.40611588 -0.45133435 0.54719448 row8 0.0000000 0.00000000 0.0000000 0.00000000 0.00000000 -0.88128357 row9 -0.3424923 0.00000000 -1.7287867 0.00000000 0.00000000 0.00000000 row10 -0.2412827 0.66158505 0.0000000 0.00000000 0.00000000 0.00000000 row11 0.1757463 0.00000000 0.1757463 0.07038577 0.00000000 0.38546682 row12 0.0000000 1.00253967 0.0000000 0.00000000 -1.50298627 0.00000000 row13 0.0000000 0.08040762 0.0000000 -2.36193942 0.70611352 0.34611078 row14 0.8174198 0.54412643 0.8389260 0.48528593 0.90080137 0.48528593 row15 0.1749099 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 row16 -0.4316827 0.00000000 -0.1803683 0.00000000 -0.12630105 0.00000000 row17 -1.2913547 0.81277947 0.0000000 0.00000000 0.00000000 0.00000000 row18 -0.6228946 -0.02505755 -0.3127396 0.00000000 -0.18757648 0.00000000 row19 0.5652893 0.00000000 0.0000000 0.56528925 0.06138407 0.00000000 row20 0.0000000 0.00000000 0.0000000 -0.99357964 0.00000000 0.00000000 col19 col20 col21 col22 col23 col24 row1 0.3931509 0.000000000 0.000000000 0.0000000 -0.29999626 0.0000000 row2 -0.8610068 0.000000000 0.000000000 0.8437413 0.00000000 0.0000000 row3 0.9061896 0.000000000 0.000000000 0.0000000 0.00000000 0.0000000 row4 0.6820895 0.000000000 0.366236548 0.0000000 0.00000000 0.0000000 row5 0.0000000 0.005792289 0.000000000 0.0000000 0.00000000 0.2105867 row6 0.3252445 0.673551178 0.000000000 0.1917131 -0.01959600 0.0000000 row7 0.0000000 0.759755922 0.000000000 0.0000000 0.00000000 0.0000000 row8 0.0000000 0.099545688 0.001105615 0.1891578 0.24472770 0.0000000 row9 0.0000000 0.391476876 0.005814395 -0.5248139 0.00000000 0.0000000 row10 0.0000000 0.000000000 0.000000000 -0.5514376 0.00000000 0.5471747 row11 0.0000000 0.000000000 0.000000000 0.0000000 0.07038577 0.6031903 row12 0.0000000 0.000000000 0.000000000 0.0000000 0.44292388 0.0000000 row13 -0.2218733 -2.361939420 0.000000000 0.1229672 0.00000000 0.0000000 row14 0.0000000 0.000000000 0.795440856 -0.1780083 0.83892597 0.0000000 row15 0.0000000 0.000000000 -0.866544020 0.0000000 1.23351681 0.0000000 row16 0.0000000 -0.298151307 0.000000000 0.1073138 0.00000000 0.0000000 row17 0.0000000 0.000000000 0.595714967 -0.8213511 0.00000000 0.0000000 row18 0.1147044 0.000000000 0.000000000 0.0000000 0.00000000 -0.9413483 row19 0.0000000 0.000000000 0.000000000 0.5442358 0.00000000 0.0000000 row20 0.0000000 0.000000000 0.000000000 -0.1669011 0.00000000 0.0000000 col25 col26 col27 col28 col29 col30 row1 -0.2459290 0.00000000 0.00000000 0.00000000 0.6808330 -0.2459290 row2 0.9307527 0.00000000 0.58591218 0.00000000 0.0000000 0.0000000 row3 0.0000000 0.81309920 -0.19242266 0.00000000 0.0000000 0.8607273 row4 -0.2987398 0.10672535 0.00000000 0.00000000 0.0000000 0.0000000 row5 0.7214123 -0.37719996 0.00000000 0.00000000 0.0000000 -0.6873549 row6 0.0000000 0.00000000 0.00000000 0.00000000 0.8607627 0.8360701 row7 -0.1459527 0.16770486 0.00000000 0.46495638 0.1677049 0.0000000 row8 0.4839574 0.06779699 0.00000000 0.00000000 0.2447277 0.2973714 row9 0.3914769 0.00000000 0.00000000 0.00000000 -0.5248139 0.0000000 row10 0.0000000 0.00000000 -0.24128267 0.51640304 0.0000000 -1.3398950 row11 0.0000000 0.00000000 -0.00657527 0.00000000 0.0000000 0.6246965 row12 0.0000000 0.77428102 0.00000000 0.00000000 -1.0975212 0.5119168 row13 0.0000000 -0.34703640 0.00000000 0.03595585 0.0000000 0.0000000 row14 0.0000000 0.00000000 0.20765419 -2.31807445 0.2076542 0.0000000 row15 0.0000000 0.11428523 0.00000000 -0.71239334 1.1703379 0.0000000 row16 -1.1248299 -0.02621759 0.00000000 0.82108027 0.0000000 0.0000000 row17 0.0000000 0.00000000 0.00000000 -1.51449823 0.0000000 0.0000000 row18 0.0000000 0.00000000 -1.07487968 0.00000000 0.0000000 0.1572640 row19 0.0000000 0.00000000 0.06138407 0.00000000 0.0000000 0.0000000 row20 0.0000000 0.19600443 0.64402915 -0.45458314 0.6714281 0.0000000 col31 col32 col33 col34 col35 col36 row1 0.000000000 0.1769278 -0.19463574 0.00000000 0.0000000 0.0000000 row2 0.000000000 0.0000000 0.00000000 0.82075177 0.0000000 0.0000000 row3 0.000000000 0.0000000 -0.82103132 0.00000000 0.9496747 -2.2073257 row4 -0.481061313 0.0000000 -0.09806906 -0.24467253 0.0000000 0.5720886 row5 -1.293490695 0.0000000 0.00000000 0.38048574 0.0000000 0.1336257 row6 0.000000000 0.0000000 0.86076272 0.00000000 0.0000000 0.0000000 row7 0.780809331 -1.4809538 0.00000000 0.80142862 0.2418128 0.0000000 row8 0.000000000 0.3714794 0.00000000 0.00000000 -0.5936015 -0.8012409 row9 0.430697589 0.0000000 0.50480556 0.00000000 -0.5248139 0.6989616 row10 -0.646747774 0.8118672 0.41796296 0.14170959 -2.9493329 0.0000000 row11 0.438110552 0.0000000 0.00000000 -0.92286600 -0.4528624 0.0000000 row12 0.848388990 0.0000000 0.89490901 -1.09752116 0.1064516 0.5447066 row13 0.729103034 0.5002615 0.65848547 0.50026146 0.0000000 0.0000000 row14 0.515138891 0.0000000 0.00000000 -0.01548936 0.0000000 0.0000000 row15 0.000000000 0.7756837 0.00000000 0.00000000 0.0000000 0.0000000 row16 0.000000000 -1.1248299 0.00000000 0.00000000 0.0000000 -0.4316827 row17 0.000000000 0.2772612 0.14372984 0.00000000 0.7880869 0.4665032 row18 0.000000000 0.0000000 0.00000000 0.87103047 0.4757177 0.0000000 row19 -0.361472781 0.4076603 0.00000000 0.45528836 0.5227296 0.0000000 row20 0.004949188 0.7240719 0.35634708 0.00000000 0.0000000 0.8891516 col37 col38 col39 col40 col41 col42 row1 0.0000000 0.0000000 0.0000000 -0.1946357 0.42054990 0.523204051 row2 0.9513720 -0.7432238 0.0000000 0.3176482 0.00000000 0.585912178 row3 -1.5141785 0.0000000 0.9496747 0.9913474 0.00000000 0.000000000 row4 0.0000000 -1.5796736 0.0000000 -0.5500542 -0.70420486 0.106725352 row5 0.0000000 0.0000000 0.0000000 0.7433912 0.00000000 0.000000000 row6 0.0000000 -1.7541971 0.1917131 0.0000000 0.00000000 0.000000000 row7 0.5731700 0.0000000 -0.6924964 -0.5254423 0.00000000 0.000000000 row8 0.0000000 -0.1473144 0.0000000 0.3950099 0.00000000 0.271395945 row9 0.3914769 0.0000000 -1.4411046 -0.1193487 0.00000000 -1.217961037 row10 0.0000000 -0.3843835 0.0000000 0.3087637 0.90081473 0.000000000 row11 0.0000000 0.1757463 -0.2297188 0.0000000 0.00000000 -0.229718821 row12 -1.5029863 -0.1166919 0.0000000 0.6072269 0.00000000 0.001091129 row13 0.6584855 0.0000000 0.0000000 0.0000000 0.00000000 0.582499560 row14 0.1668322 -1.2194622 0.0000000 0.0000000 0.00000000 0.000000000 row15 0.0000000 -1.5596912 0.0000000 -0.3557184 0.00000000 -0.019246160 row16 0.0000000 0.0000000 0.0000000 0.0000000 0.00000000 0.020302425 row17 0.8368770 0.7627691 0.0000000 0.8127795 0.09493968 0.905869896 row18 -0.9413483 0.2373067 0.4131974 0.0000000 -0.02505755 0.000000000 row19 0.6061112 0.0000000 0.2776072 -0.8210051 -0.41554000 0.000000000 row20 0.8671727 0.0000000 -1.1477303 0.0000000 0.23856404 0.000000000 col43 col44 col45 col46 col47 col48 row1 0.00000000 0.0000000 0.0000000 -0.24592904 0.30613955 0.0000000 row2 0.23760548 0.0000000 0.0000000 0.00000000 0.00000000 0.0000000 row3 0.00000000 0.8837168 -0.3355235 0.00000000 -1.80186057 0.0000000 row4 0.14309300 0.7027088 0.0000000 0.00000000 0.70270878 0.3662365 row5 0.00000000 0.0000000 0.4982688 0.00000000 0.00000000 -0.6873549 row6 0.00000000 0.0000000 0.6129266 0.00000000 0.28268487 0.0000000 row7 0.00000000 -0.1459527 -1.1444815 0.00000000 0.00000000 0.0000000 row8 0.00000000 0.5256301 -0.5329769 0.00000000 0.00000000 0.0000000 row9 0.83616270 0.0000000 0.4684379 0.53989688 0.69896158 0.0000000 row10 0.00000000 0.0000000 0.9424874 0.51640304 -0.75210829 0.0000000 row11 -1.83915673 0.0000000 0.0000000 0.00000000 0.30090943 0.0000000 row12 0.00000000 0.0000000 -1.2798427 0.00000000 0.00000000 0.0000000 row13 0.00000000 0.0000000 0.0000000 0.00000000 0.20300994 -1.1091765 row14 -1.21946216 0.5441264 -0.4462723 0.35607420 -1.40178372 0.8389260 row15 1.10289663 -1.5596912 0.0000000 0.00000000 0.00000000 1.1028966 row16 0.61813943 0.1873565 -0.1263010 -0.07500776 0.06475419 0.6181394 row17 0.00000000 0.7880869 -1.8021803 0.19024986 -0.95488245 -0.9548824 row18 0.82935778 0.6680896 0.0000000 0.71687979 0.00000000 -0.1875765 row19 -0.01007489 0.0000000 0.0000000 0.00000000 -0.17041754 0.5652893 row20 -1.55319543 0.5570178 0.0000000 0.00000000 0.00000000 0.0000000 col49 col50 row1 -0.2459290 0.1418365 row2 0.0000000 -1.3310104 row3 0.0000000 0.0000000 row4 -0.2446725 0.3944074 row5 0.0000000 0.0000000 row6 0.0000000 -1.2433714 row7 0.2054452 0.0000000 row8 -0.0339857 0.0000000 row9 0.7561200 0.0000000 row10 0.0000000 0.0000000 row11 0.0000000 0.2402848 row12 -1.2798427 0.0000000 row13 0.0000000 0.0000000 row14 0.0000000 -2.3180745 row15 0.0000000 0.0000000 row16 0.0000000 0.0000000 row17 0.0000000 0.0000000 row18 0.0000000 0.0000000 row19 -0.6668544 0.1280754 row20 -1.1477303 0.8217103 attr(,"parameters") attr(,"parameters")$means row1 row2 row3 row4 row5 row6 row7 row8 3.190368 2.940448 2.900473 3.189112 3.085250 2.852809 3.090392 3.366190 row9 row10 row11 row12 row13 row14 row15 row16 2.827399 2.949333 3.225451 2.889281 3.055087 3.011222 2.658303 3.070740 row17 row18 row19 row20 2.900793 3.020790 3.305912 2.939490 attr(,"parameters")$margin [1] 1 attr(,"decostand") [1] "rclr" > vegan::decostand(testdata, method = "clr", pseudocount=1) col1 col2 col3 col4 col5 col6 row1 1.6188113 2.1006494 -1.4257111 -0.03941676 -1.42571112 2.040025 row2 -1.3336941 -1.3336941 -1.3336941 0.05260022 -1.33369414 2.067503 row3 2.0926934 -1.3730425 1.5713964 2.49815846 -1.37304255 1.024853 row4 0.8247624 -1.8142949 -1.8142949 2.01434649 -1.81429491 -1.814295 row5 0.8154243 2.7196617 -1.1304859 -1.13048587 2.30350133 1.813953 row6 -1.1213567 0.9580849 -1.1213567 2.37515088 -1.12135668 -1.121357 row7 -1.5746088 1.9807393 -1.5746088 -1.57460880 2.00891014 1.921899 row8 -1.3615249 1.3465253 -1.3615249 -1.36152489 -1.36152489 -1.361525 row9 -1.5116079 -1.5116079 -1.5116079 1.66644593 -0.12531354 -1.511608 row10 -1.3340546 -1.3340546 -1.3340546 -1.33405456 -1.33405456 1.924042 row11 2.2631803 -1.3744059 1.8836907 -1.37440588 2.15195464 -1.374406 row12 2.1600688 -1.3056671 2.5229743 -1.30566713 -1.30566713 0.996918 row13 -1.5654238 1.8018720 2.2632176 -1.56542385 0.04401407 1.989924 row14 1.6730541 1.9078936 1.0911325 2.01789454 -1.85330647 -1.853306 row15 2.3747278 -0.9925680 1.5723814 0.39372635 2.18548582 -0.992568 row16 1.8962468 2.1475613 1.8221389 -1.43595767 1.78291816 -1.435958 row17 0.7097225 -1.3697191 -1.3697191 1.11518760 2.34385301 -1.369719 row18 1.9236025 0.3141646 1.8182420 1.74128093 1.41277687 -1.477595 row19 -1.4773886 -1.4773886 -1.4773886 1.85481590 -0.37877633 1.658106 row20 2.5875540 -1.3244690 0.2849689 -1.32446901 1.44811971 -1.324469 col7 col8 col9 col10 col11 col12 row1 -1.425711 -1.425711 1.4075022 -1.4257111 -1.42571112 -1.425711 row2 1.556678 -0.640547 -1.3336941 1.7573483 1.71082830 2.355185 row3 0.706399 -1.373043 0.8241820 1.3995462 2.29051910 1.845833 row4 1.992368 -1.814295 1.2302275 1.8492667 -1.81429491 -1.814295 row5 -1.130486 -1.130486 2.7613344 -1.1304859 1.75988588 -1.130486 row6 -1.121357 -1.121357 -0.4282095 -1.1213567 2.24593915 -1.121357 row7 1.921899 -1.574609 0.2171507 0.2171507 2.31721150 -1.574609 row8 2.550498 -1.361525 -1.3615249 -1.3615249 -1.36152489 -1.361525 row9 2.071911 -1.511608 2.0437402 2.2725817 0.79097719 -1.511608 row10 2.472608 -1.334055 -1.3340546 1.8014397 1.75698789 -1.334055 row11 -1.374406 -1.374406 1.6701166 -1.3744059 -1.37440588 -1.374406 row12 -1.305667 2.095530 -1.3056671 -1.3056671 -1.30566713 2.500995 row13 2.148148 -1.565424 2.2412386 1.1426264 2.01809509 -1.565424 row14 1.975335 -1.853306 0.3439181 -1.8533065 0.09260368 -1.853306 row15 -0.992568 -0.992568 -0.9925680 -0.9925680 1.71548219 -0.992568 row16 -1.435958 -1.435958 1.6085648 -1.4359577 2.27761440 -1.435958 row17 2.096017 -1.369719 -1.3697191 -1.3697191 -1.36971905 -1.369719 row18 -1.477595 -1.477595 -1.4775949 2.2600747 -1.47759489 -1.477595 row19 -1.477389 2.372759 -1.4773886 -1.4773886 -1.47738861 -1.477389 row20 -1.324469 -1.324469 -1.3244690 2.2018915 -1.32446901 1.448120 col13 col14 col15 col16 col17 col18 row1 -1.4257111 2.311958 2.3809514 -1.4257111 -1.4257111 1.870126 row2 -1.3336941 2.427506 1.1512125 2.1320418 -1.3336941 2.132042 row3 2.1533180 -1.373043 -1.3730425 -1.3730425 -1.3730425 -1.373043 row4 1.7692240 1.586902 -1.8142949 1.2767475 -0.2048570 2.014346 row5 2.2368100 -1.130486 -1.1304859 -1.1304859 -1.1304859 -1.130486 row6 1.5866935 -1.121357 -1.1213567 2.3126305 -1.1213567 2.279841 row7 -1.5746088 -1.574609 -1.5746088 1.9517517 1.1334414 2.088953 row8 -1.3615249 -1.361525 -1.3615249 -1.3615249 -1.3615249 1.203424 row9 1.0533415 -1.511608 -0.1253135 -1.5116079 -1.5116079 -1.511608 row10 1.4385342 2.303532 -1.3340546 -1.3340546 -1.3340546 -1.334055 row11 2.0595813 -1.374406 2.0595813 1.9577986 -1.3744059 2.263180 row12 -1.3056671 2.606356 -1.3056671 -1.3056671 0.3037708 -1.305667 row13 -1.5654238 1.612630 -1.5654238 -0.4668116 2.2187658 1.868563 row14 1.9968411 1.730212 2.0178945 1.6730541 2.0785192 1.673054 row15 1.8978038 -0.992568 -0.9925680 -0.9925680 -0.9925680 -0.992568 row16 1.2720925 -1.435958 1.5084813 -1.4359577 1.5597746 -1.435958 row17 0.4220404 2.367951 -1.3697191 -1.3697191 -1.3697191 -1.369719 row18 1.0073118 1.566928 1.2949938 -1.4775949 1.4127769 -1.477595 row19 2.4144317 -1.477389 -1.4773886 2.4144317 1.9238088 -1.477389 row20 -1.3244690 -1.324469 -1.3244690 0.7549725 -1.3244690 -1.324469 col19 col20 col21 col22 col23 col24 row1 2.1852068 -1.4257111 -1.4257111 -1.4257111 1.518728 -1.4257111 row2 0.8635304 -1.3336941 -1.3336941 2.4729684 -1.333694 -1.3336941 row3 2.4555988 -1.3730425 -1.3730425 -1.3730425 -1.373043 -1.3730425 row4 2.0775254 -1.8142949 1.7692240 -1.8142949 -1.814295 -1.8142949 row5 -1.1304859 2.0050083 -1.1304859 -1.1304859 -1.130486 2.2017186 row6 2.0975191 2.4339914 -1.1213567 1.9696858 1.769015 -1.1213567 row7 -1.5746088 2.2965922 -1.5746088 -1.5746088 -1.574609 -1.5746088 row8 -1.3615249 2.1349827 2.0396725 2.2219941 2.276061 -1.3615249 row9 -1.5116079 1.7464886 1.3787639 0.8862874 -1.511608 -1.5116079 row10 -1.3340546 -1.3340546 -1.3340546 1.1508521 -1.334055 2.1923060 row11 -1.3744059 -1.3744059 -1.3744059 -1.3744059 1.957799 2.4757417 row12 -1.3056671 -1.3056671 -1.3056671 -1.3056671 2.061629 -1.3056671 row13 1.3249479 -0.4668116 -1.5654238 1.6534520 -1.565424 -1.5654238 row14 -1.8533065 -1.8533065 1.9753349 1.0370653 2.017895 -1.8533065 row15 -0.9925680 -0.9925680 0.9533421 -0.9925680 2.919455 -0.9925680 row16 -1.4359577 1.3972557 -1.4359577 1.7829182 -1.435958 -1.4359577 row17 -1.3697191 -1.3697191 2.1566415 0.8275055 -1.369719 -1.3697191 row18 1.7004589 -1.4775949 -1.4775949 -1.4775949 -1.477595 0.7196297 row19 -1.4773886 -1.4773886 -1.4773886 2.3938124 -1.477389 -1.4773886 row20 -1.3244690 -1.3244690 -1.3244690 1.5087443 -1.324469 -1.3244690 col25 col26 col27 col28 col29 col30 row1 1.5700211 -1.425711 -1.4257111 -1.4257111 2.4661092 1.5700211 row2 2.5581262 -1.333694 2.2216539 -1.3336941 -1.3336941 -1.3336941 row3 -1.3730425 2.364627 1.3995462 -1.3730425 -1.3730425 2.4111471 row4 1.1301441 1.517910 -1.8142949 -1.8142949 -1.8142949 -1.8142949 row5 2.6981555 1.642103 -1.1304859 -1.1304859 -1.1304859 1.3544208 row6 -1.1213567 -1.121357 -1.1213567 -1.1213567 2.6163129 2.5922154 row7 1.4211235 1.721228 -1.5746088 2.0089101 1.7212281 -1.5746088 row8 2.5096761 2.104211 -1.3615249 -1.3615249 2.2760613 2.3273546 row9 1.7464886 -1.511608 -1.5116079 -1.5116079 0.8862874 -1.5116079 row10 -1.3340546 -1.334055 1.4385342 2.1624530 -1.3340546 0.4577049 row11 -1.3744059 -1.374406 1.8836907 -1.3744059 -1.3744059 2.4967951 row12 -1.3056671 2.383212 -1.3056671 -1.3056671 0.6402430 2.1283201 row13 -1.5654238 1.207165 -1.5654238 1.5700704 -1.5654238 -1.5654238 row14 -1.8533065 -1.853306 1.4047901 -0.7546942 1.4047901 -1.8533065 row15 -0.9925680 1.840645 -0.9925680 1.0868735 2.8575796 -0.9925680 row16 0.6434839 1.655085 -1.4359577 2.4760653 -1.4359577 -1.4359577 row17 -1.3697191 -1.369719 -1.3697191 0.2397189 -1.3697191 -1.3697191 row18 -1.4775949 -1.477595 0.6018467 -1.4775949 -1.4775949 1.7412809 row19 -1.4773886 -1.477389 1.9238088 -1.4773886 -1.4773886 -1.4773886 row20 -1.3244690 1.853585 2.2864489 1.2404803 2.3131172 -1.3244690 col31 col32 col33 col34 col35 col36 row1 -1.4257111 1.9754863 1.618811 -1.425711 -1.4257111 -1.4257111 row2 -1.3336941 -1.3336941 -1.333694 2.450495 -1.3336941 -1.3336941 row3 -1.3730425 -1.3730425 0.824182 -1.373043 2.4981585 -0.2744303 row4 0.9582938 -1.8142949 1.321199 1.181437 -1.8142949 1.9698947 row5 0.8154243 -1.1304859 -1.130486 2.366022 -1.1304859 2.1276107 row6 -1.1213567 -1.1213567 2.616313 -1.121357 -1.1213567 -1.1213567 row7 2.3172115 0.2171507 -1.574609 2.337414 1.7926870 -1.5746088 row8 -1.3615249 2.3996752 -1.361525 -1.361525 1.4716885 1.2775324 row9 1.7842290 -1.5116079 1.855688 -1.511608 0.8862874 2.0437402 row10 1.0638407 2.4501351 2.067143 1.801440 -0.6409074 -1.3340546 row11 2.3144736 -1.3744059 -1.374406 1.023489 1.4588075 -1.3744059 row12 2.4555330 -1.3056671 2.500995 0.640243 1.7388553 2.1600688 row13 2.2412386 2.0180951 2.172246 2.018095 -1.5654238 -1.5654238 row14 1.7020416 -1.8533065 -1.853306 1.191216 -1.8533065 -1.8533065 row15 -0.9925680 2.4731679 -0.992568 -0.992568 -0.9925680 -0.9925680 row16 -1.4359577 0.6434839 -1.435958 -1.435958 -1.4359577 1.2720925 row17 -1.3697191 1.8491568 1.721323 -1.369719 2.3438530 2.0314783 row18 -1.4775949 -1.4775949 -1.477595 2.434428 2.0487656 -1.4775949 row19 1.5183437 2.2602810 -1.477389 2.306801 2.3727590 -1.4773886 row20 1.6712633 2.3644104 2.007736 -1.324469 -1.3244690 2.5256786 col37 col38 col39 col40 col41 col42 row1 -1.4257111 -1.42571112 -1.42571112 1.6188113 2.2118750 2.3119585 row2 2.5783289 0.96889095 -1.33369414 1.9621427 -1.3336941 2.2216539 row3 0.2363954 -1.37304255 2.49815846 2.5389805 -1.3730425 -1.3730425 row4 -1.8142949 -0.02253544 -1.81429491 0.8937553 0.7506544 1.5179096 row5 -1.1304859 -1.13048587 -1.13048587 2.7196617 -1.1304859 -1.1304859 row6 -1.1213567 0.26493768 1.96968577 -1.1213567 -1.1213567 -1.1213567 row7 2.1142707 -1.57460880 0.91029785 1.0644485 -1.5746088 -1.5746088 row8 -1.3615249 1.89657165 -1.36152489 2.4226647 -1.3615249 2.3020368 row9 1.7464886 -1.51160790 0.09783001 1.2609808 -1.5116079 0.2801516 row10 -1.3340546 1.30500277 -1.33405456 1.9617823 2.5371464 -1.3340546 row11 -1.3744059 2.05958132 1.67011656 -1.3744059 -1.3744059 1.6701166 row12 0.3037708 1.52754621 -1.30566713 2.2206934 -1.3056671 1.6387718 row13 2.1722458 -1.56542385 -1.56542385 -1.5654238 -1.5654238 2.0981378 row14 1.3655694 0.09260368 -1.85330647 -1.8533065 -1.8533065 -1.8533065 row15 -0.9925680 0.39372635 -0.99256801 1.4053273 -0.9925680 1.7154822 row16 -1.4359577 -1.43595767 -1.43595767 -1.4359577 -1.4359577 1.6995365 row17 2.3914811 2.31916040 -1.36971905 2.3679506 1.6748034 2.4589223 row18 0.7196297 1.81824198 1.98814101 -1.4775949 1.5669275 -1.4775949 row19 2.4544370 -1.47738861 2.13352930 1.0875607 1.4670504 -1.4773886 row20 2.5041724 -1.32446901 0.62144114 -1.3244690 1.8944068 -1.3244690 col43 col44 col45 col46 col47 col48 row1 -1.42571112 -1.4257111 -1.42571112 1.570021 2.10064940 -1.4257111 row2 1.88518169 -1.3336941 -1.33369414 -1.333694 -1.33369414 -1.3336941 row3 -1.37304255 2.4336199 1.26601478 -1.373043 0.01325181 -1.3730425 row4 1.55300092 2.0977281 -1.81429491 -1.814295 2.09772810 1.7692240 row5 -1.13048587 -1.1304859 2.48043204 -1.130486 -1.13048587 1.3544208 row6 -1.12135668 -1.1213567 2.37515088 -1.121357 2.05669715 -1.1213567 row7 -1.57460880 1.4211235 0.50483274 -1.574609 -1.57460880 -1.5746088 row8 -1.36152489 2.5504981 1.52884687 -1.361525 -1.36152489 -1.3615249 row9 2.17727155 -1.5116079 1.82059661 1.889589 2.04374016 -1.5116079 row10 -1.33405456 -1.3340546 2.57796844 2.162453 0.96853053 -1.3340546 row11 0.23503203 -1.3744059 -1.37440588 -1.374406 2.18094218 -1.3744059 row12 -1.30566713 -1.3056671 0.48609234 -1.305667 -1.30566713 -1.3056671 row13 -1.56542385 -1.5654238 -1.56542385 -1.565424 1.73041302 0.5140177 row14 0.09260368 1.7302125 0.78575086 1.547891 -0.06154700 2.0178945 row15 2.79162163 0.3937264 -0.99256801 -0.992568 -0.99256801 2.7916216 row16 2.27761440 1.8598792 1.55977460 1.608565 1.74209616 2.2776144 row17 -1.36971905 2.3438530 0.01657531 1.765775 0.70972249 0.7097225 row18 2.39360612 2.2359772 -1.47759489 2.283605 -1.47759489 1.4127769 row19 1.85481590 -1.4773886 -1.47738861 -1.477389 1.70066522 2.4144317 row20 0.28496890 2.2018915 -1.32446901 -1.324469 -1.32446901 -1.3244690 col49 col50 row1 1.5700211 1.9415847 row2 -1.3336941 0.4580653 row3 -1.3730425 -1.3730425 row4 1.1814374 1.7966230 row5 -1.1304859 -1.1304859 row6 -1.1213567 0.6704028 row7 1.7575957 -1.5746088 row8 2.0057709 -1.3615249 row9 2.0993100 -1.5116079 row10 -1.3340546 -1.3340546 row11 -1.3744059 2.1221017 row12 0.4860923 -1.3056671 row13 -1.5654238 -1.5654238 row14 -1.8533065 -0.7546942 row15 -0.9925680 -0.9925680 row16 -1.4359577 -1.4359577 row17 -1.3697191 -1.3697191 row18 -1.4775949 -1.4775949 row19 1.2306616 1.9883473 row20 0.6214411 2.4597206 attr(,"parameters") attr(,"parameters")$means row1 row2 row3 row4 row5 row6 row7 row8 1.425711 1.333694 1.373043 1.814295 1.130486 1.121357 1.574609 1.361525 row9 row10 row11 row12 row13 row14 row15 row16 1.511608 1.334055 1.374406 1.305667 1.565424 1.853306 0.992568 1.435958 row17 row18 row19 row20 1.369719 1.477595 1.477389 1.324469 attr(,"parameters")$pseudocount [1] 1 attr(,"parameters")$margin [1] 1 attr(,"decostand") [1] "clr" > # Expect error > class(try(vegan::decostand(testdata, method = "clr")))=="try-error" Error : 'clr' cannot be used with non-positive data: use pseudocount > 0 [1] TRUE > class(try(vegan::decostand(testdata, method = "clr", pseudocount=0)))=="try-error" Error : 'clr' cannot be used with non-positive data: use pseudocount > 0 [1] TRUE > > # Tests that clr robust gives values that are approximately same if only > # one value per sample are changed to zero > # Adds pseudocount > test <- testdata+1 > test2 <- test; test2[,1] <- 0 > > # clr robust transformations > test <- vegan::decostand(test, method = "rclr") > test2 <- vegan::decostand(test2, method = "rclr") > > # Removes first cols > test <- test[, -1] > test2 <- test2[, -1] > > # Expect high correlation > cor(unlist(test), unlist(test2)) > 0.99 col2 col3 col4 col5 col6 col7 col8 col9 col10 col11 col12 col13 col2 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col3 FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col4 FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col5 FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col6 FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col7 FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE col8 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE col9 FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 col24 col25 col2 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col3 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col4 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col5 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col6 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col7 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col8 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col9 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col14 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col15 FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col16 FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col17 FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col18 FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col19 FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE col20 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col26 col27 col28 col29 col30 col31 col32 col33 col34 col35 col36 col37 col2 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col3 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col4 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col5 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col6 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col7 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col8 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col9 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col26 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col27 FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col28 FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col29 FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col30 FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col31 FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE col32 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col38 col39 col40 col41 col42 col43 col44 col45 col46 col47 col48 col49 col2 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col3 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col4 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col5 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col6 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col7 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col8 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col9 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col38 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col39 FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col40 FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col41 FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col42 FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col43 FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE col44 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE col50 col2 FALSE col3 FALSE col4 FALSE col5 FALSE col6 FALSE col7 FALSE col8 FALSE col9 FALSE col10 FALSE col11 FALSE col12 FALSE col13 FALSE col14 FALSE col15 FALSE col16 FALSE col17 FALSE col18 FALSE col19 FALSE col20 FALSE col21 FALSE col22 FALSE col23 FALSE col24 FALSE col25 FALSE col26 FALSE col27 FALSE col28 FALSE col29 FALSE col30 FALSE col31 FALSE col32 FALSE col33 FALSE col34 FALSE col35 FALSE col36 FALSE col37 FALSE col38 FALSE col39 FALSE col40 FALSE col41 FALSE col42 FALSE col43 FALSE col44 FALSE col45 FALSE col46 FALSE col47 FALSE col48 FALSE col49 FALSE col50 TRUE > > ############################# NAMES #################################### > > # Tests that dimensins have correct names > all(rownames(vegan::decostand(testdata+1, method = "clr")) == rownames(testdata)) [1] TRUE > all(colnames(vegan::decostand(testdata, method = "clr", pseudocount=1)) == colnames(testdata)) [1] TRUE > all(rownames(vegan::decostand(testdata, method = "rclr")) == rownames(testdata)) [1] TRUE > all(colnames(vegan::decostand(testdata, method = "rclr")) == colnames(testdata)) [1] TRUE > > ######################################################################## > > # Count vs. Relative data > > # CLR is identical with count and relative data > a1 <- vegan::decostand(testdata.with.pseudo, method = "clr") > a2 <- vegan::decostand(relative.with.pseudo, method = "clr") > max(abs(a1-a2)) < 1e-6 # Tolerance [1] TRUE > > # rCLR is identical with count and relative data > a1 <- vegan::decostand(testdata.with.pseudo, method = "rclr") > a2 <- vegan::decostand(relative.with.pseudo, method = "rclr") > max(abs(a1-a2)) < 1e-6 # Tolerance [1] TRUE > > # ALR is identical with count and relative data > a1 <- vegan::decostand(testdata.with.pseudo, method = "alr") > a2 <- vegan::decostand(relative.with.pseudo, method = "alr") > max(abs(a1-a2)) < 1e-6 # Tolerance [1] FALSE > > ####### # ALR transformation drops one feature ################ > ncol(vegan::decostand(testdata.with.pseudo, "alr")) == ncol(testdata.with.pseudo)-1 [1] FALSE > > > > > > > > proc.time() user system elapsed 0.87 0.09 0.96