array_apply_1D_function.Rd
Used by a number of functions in the array_coda group.
array_apply_1D_function(a, dimno, f, dimname = NULL)
a | input array |
---|---|
f | function to apply to matrix that returns a matrix |
dimname | (optional) charachter vector for dimension output from matrix operation |
dim | dimension (as integer) along which to apply matrix operation |
array
If the matrix operation does not change the dimension of the array and dimnames is null, uses existing dimnames.
a <- array(runif(600), dim = c(100, 3, 2)) array_apply_1D_function(a, 2, miniclo)#> , , 1 #> #> [,1] [,2] [,3] #> [1,] 0.06534614 0.65198752 0.28266633 #> [2,] 0.32142859 0.31361501 0.36495639 #> [3,] 0.49211561 0.33086526 0.17701913 #> [4,] 0.38556792 0.53572181 0.07871027 #> [5,] 0.01295700 0.73258358 0.25445942 #> [6,] 0.23441004 0.33617540 0.42941457 #> [7,] 0.40849072 0.41659271 0.17491657 #> [8,] 0.24970522 0.56906074 0.18123404 #> [9,] 0.57069414 0.39853115 0.03077470 #> [10,] 0.30261155 0.32730197 0.37008648 #> [11,] 0.47836568 0.38767016 0.13396416 #> [12,] 0.09558191 0.47763792 0.42678017 #> [13,] 0.10253184 0.03437419 0.86309397 #> [14,] 0.15373646 0.42622479 0.42003875 #> [15,] 0.23744231 0.58801468 0.17454302 #> [16,] 0.11651267 0.29784176 0.58564557 #> [17,] 0.29839930 0.26544087 0.43615983 #> [18,] 0.03984487 0.48500788 0.47514725 #> [19,] 0.21484091 0.32304803 0.46211106 #> [20,] 0.41121691 0.26723631 0.32154678 #> [21,] 0.18513670 0.54837821 0.26648510 #> [22,] 0.49038972 0.40979832 0.09981196 #> [23,] 0.68775348 0.23663123 0.07561529 #> [24,] 0.11066359 0.51888017 0.37045623 #> [25,] 0.40023763 0.35403585 0.24572652 #> [26,] 0.45021026 0.15089875 0.39889100 #> [27,] 0.06565001 0.51411212 0.42023788 #> [28,] 0.23261902 0.33765826 0.42972271 #> [29,] 0.45463964 0.07806974 0.46729062 #> [30,] 0.39214269 0.11088162 0.49697569 #> [31,] 0.02648695 0.13957389 0.83393915 #> [32,] 0.20369908 0.59892292 0.19737800 #> [33,] 0.16511602 0.47014553 0.36473845 #> [34,] 0.32596200 0.47452514 0.19951286 #> [35,] 0.44458447 0.51266370 0.04275183 #> [36,] 0.26576322 0.35486588 0.37937090 #> [37,] 0.35457199 0.34504253 0.30038548 #> [38,] 0.59280536 0.15293471 0.25425993 #> [39,] 0.16647412 0.04118694 0.79233893 #> [40,] 0.13189928 0.55329290 0.31480782 #> [41,] 0.39312650 0.04085295 0.56602055 #> [42,] 0.32976017 0.65899167 0.01124816 #> [43,] 0.33299748 0.31751889 0.34948363 #> [44,] 0.54835743 0.14330784 0.30833473 #> [45,] 0.04992221 0.47281124 0.47726655 #> [46,] 0.51693785 0.02528725 0.45777490 #> [47,] 0.37945277 0.29262440 0.32792283 #> [48,] 0.49941869 0.11946053 0.38112078 #> [49,] 0.40109882 0.37455635 0.22434483 #> [50,] 0.26889447 0.56577640 0.16532913 #> [51,] 0.27617454 0.41908223 0.30474322 #> [52,] 0.33096023 0.23096991 0.43806986 #> [53,] 0.10718840 0.44672553 0.44608607 #> [54,] 0.38343565 0.15658778 0.45997657 #> [55,] 0.36666819 0.33888282 0.29444899 #> [56,] 0.37618846 0.16064936 0.46316218 #> [57,] 0.19060907 0.53058111 0.27880983 #> [58,] 0.70229804 0.24828184 0.04942012 #> [59,] 0.05899684 0.41976333 0.52123983 #> [60,] 0.23775889 0.61597333 0.14626778 #> [61,] 0.42892014 0.50566259 0.06541727 #> [62,] 0.13481588 0.40327963 0.46190450 #> [63,] 0.25065252 0.39702154 0.35232595 #> [64,] 0.20041270 0.34705546 0.45253184 #> [65,] 0.31351949 0.40645371 0.28002680 #> [66,] 0.11048400 0.57407218 0.31544382 #> [67,] 0.54014055 0.40518993 0.05466952 #> [68,] 0.47346248 0.18759618 0.33894134 #> [69,] 0.53989930 0.28923753 0.17086317 #> [70,] 0.16474484 0.42680332 0.40845184 #> [71,] 0.22463992 0.43580793 0.33955215 #> [72,] 0.23872064 0.15322198 0.60805738 #> [73,] 0.12265655 0.01965369 0.85768976 #> [74,] 0.19594598 0.39674536 0.40730867 #> [75,] 0.32094352 0.36052816 0.31852832 #> [76,] 0.01412037 0.52821728 0.45766235 #> [77,] 0.20273981 0.35915989 0.43810030 #> [78,] 0.53897329 0.39271587 0.06831084 #> [79,] 0.49394998 0.20242990 0.30362013 #> [80,] 0.20399416 0.39127487 0.40473097 #> [81,] 0.32435522 0.40814077 0.26750402 #> [82,] 0.48503655 0.06882203 0.44614142 #> [83,] 0.19777874 0.64783203 0.15438923 #> [84,] 0.72866032 0.19339652 0.07794317 #> [85,] 0.20849020 0.37037905 0.42113075 #> [86,] 0.76351188 0.08825726 0.14823087 #> [87,] 0.24084408 0.29138011 0.46777581 #> [88,] 0.15836290 0.18365547 0.65798163 #> [89,] 0.30607447 0.31281882 0.38110671 #> [90,] 0.07082371 0.19770670 0.73146959 #> [91,] 0.34901933 0.33353181 0.31744886 #> [92,] 0.29407166 0.63507234 0.07085600 #> [93,] 0.51265634 0.35742047 0.12992319 #> [94,] 0.46289850 0.48565902 0.05144248 #> [95,] 0.32024613 0.36917665 0.31057723 #> [96,] 0.32274211 0.13462159 0.54263629 #> [97,] 0.36019753 0.59658440 0.04321806 #> [98,] 0.48142438 0.44562821 0.07294741 #> [99,] 0.02072879 0.28426108 0.69501013 #> [100,] 0.27849743 0.59311877 0.12838380 #> #> , , 2 #> #> [,1] [,2] [,3] #> [1,] 0.5536353062 0.277463731 0.168900963 #> [2,] 0.1996061470 0.733491555 0.066902298 #> [3,] 0.3101098070 0.516193353 0.173696840 #> [4,] 0.4086530522 0.100905804 0.490441144 #> [5,] 0.1782471368 0.659224174 0.162528689 #> [6,] 0.1917958552 0.282850110 0.525354035 #> [7,] 0.3178927812 0.432890541 0.249216678 #> [8,] 0.0403022903 0.595810777 0.363886933 #> [9,] 0.4774168652 0.004031362 0.518551772 #> [10,] 0.2476536459 0.217546457 0.534799897 #> [11,] 0.5071727915 0.355289081 0.137538128 #> [12,] 0.3950278279 0.463785199 0.141186973 #> [13,] 0.4072821401 0.107472990 0.485244870 #> [14,] 0.5437498595 0.209988146 0.246261995 #> [15,] 0.3839362526 0.280210707 0.335853040 #> [16,] 0.2214187478 0.646930093 0.131651160 #> [17,] 0.7282914961 0.018157752 0.253550752 #> [18,] 0.0400668718 0.112960621 0.846972507 #> [19,] 0.2909497648 0.367073258 0.341976977 #> [20,] 0.1467407664 0.829808824 0.023450410 #> [21,] 0.0402939706 0.174540315 0.785165715 #> [22,] 0.4477552797 0.065623184 0.486621536 #> [23,] 0.6509358170 0.289213796 0.059850387 #> [24,] 0.5878052163 0.286850597 0.125344187 #> [25,] 0.2282754158 0.472762343 0.298962241 #> [26,] 0.1881928953 0.529218343 0.282588762 #> [27,] 0.5382637260 0.090892694 0.370843579 #> [28,] 0.3681154903 0.431182839 0.200701671 #> [29,] 0.0396449793 0.763231648 0.197123372 #> [30,] 0.5579816507 0.382385249 0.059633100 #> [31,] 0.2821481487 0.694561573 0.023290279 #> [32,] 0.0159614932 0.257753749 0.726284758 #> [33,] 0.0710040337 0.392973176 0.536022790 #> [34,] 0.3133075563 0.442272195 0.244420249 #> [35,] 0.4368404041 0.449862791 0.113296805 #> [36,] 0.2769912684 0.673780956 0.049227776 #> [37,] 0.4212538463 0.079589839 0.499156315 #> [38,] 0.3194072000 0.399424861 0.281167939 #> [39,] 0.3292108606 0.390104817 0.280684323 #> [40,] 0.3865860774 0.303103972 0.310309951 #> [41,] 0.3398553154 0.271969281 0.388175404 #> [42,] 0.3687361097 0.323862064 0.307401826 #> [43,] 0.2540159767 0.723326072 0.022657952 #> [44,] 0.3492124108 0.060716195 0.590071394 #> [45,] 0.4809750652 0.276368087 0.242656848 #> [46,] 0.2934596150 0.222009873 0.484530512 #> [47,] 0.4318545342 0.285307607 0.282837859 #> [48,] 0.3701960697 0.405192533 0.224611397 #> [49,] 0.5405195768 0.110352603 0.349127820 #> [50,] 0.5191783526 0.383408555 0.097413093 #> [51,] 0.3134988790 0.328770997 0.357730124 #> [52,] 0.3749676566 0.297245774 0.327786569 #> [53,] 0.1641828440 0.327152167 0.508664989 #> [54,] 0.1230876205 0.286016654 0.590895725 #> [55,] 0.0856473645 0.269587843 0.644764793 #> [56,] 0.4696133152 0.199123345 0.331263340 #> [57,] 0.1979753172 0.396402735 0.405621948 #> [58,] 0.0750048245 0.015473856 0.909521319 #> [59,] 0.6905390040 0.044195044 0.265265952 #> [60,] 0.4921801345 0.214934267 0.292885598 #> [61,] 0.0937597471 0.374223346 0.532016907 #> [62,] 0.4166521763 0.230119152 0.353228672 #> [63,] 0.3149089882 0.236884844 0.448206167 #> [64,] 0.3579741232 0.282926581 0.359099296 #> [65,] 0.0306199669 0.503956711 0.465423322 #> [66,] 0.2743721427 0.683325223 0.042302635 #> [67,] 0.5773562951 0.036425385 0.386218320 #> [68,] 0.3808310202 0.294347536 0.324821444 #> [69,] 0.3774709561 0.280773800 0.341755244 #> [70,] 0.4734675581 0.147538260 0.378994182 #> [71,] 0.4632287453 0.123877367 0.412893887 #> [72,] 0.0405553559 0.631962516 0.327482128 #> [73,] 0.5410191440 0.245382217 0.213598639 #> [74,] 0.4606005359 0.461018642 0.078380822 #> [75,] 0.4267296257 0.321812566 0.251457809 #> [76,] 0.2190691959 0.188655698 0.592275106 #> [77,] 0.3226054547 0.330045982 0.347348563 #> [78,] 0.2613176516 0.411919312 0.326763036 #> [79,] 0.6878088226 0.036105947 0.276085231 #> [80,] 0.5695187280 0.420917515 0.009563757 #> [81,] 0.5860192719 0.123553106 0.290427622 #> [82,] 0.3421632220 0.368240064 0.289596714 #> [83,] 0.2077265164 0.544542072 0.247731412 #> [84,] 0.0001393871 0.259363999 0.740496614 #> [85,] 0.1673685747 0.705085474 0.127545951 #> [86,] 0.9438100743 0.013252797 0.042937129 #> [87,] 0.1519376456 0.478311828 0.369750527 #> [88,] 0.4930016556 0.219120683 0.287877662 #> [89,] 0.4846826819 0.038415060 0.476902258 #> [90,] 0.0026899142 0.432949149 0.564360937 #> [91,] 0.3603276870 0.597387693 0.042284620 #> [92,] 0.1207342610 0.459567745 0.419697994 #> [93,] 0.5273557131 0.408728022 0.063916265 #> [94,] 0.4972835065 0.411482507 0.091233986 #> [95,] 0.4056201801 0.217994482 0.376385337 #> [96,] 0.2089912953 0.484956674 0.306052030 #> [97,] 0.3886532094 0.291920557 0.319426233 #> [98,] 0.5316242488 0.248073416 0.220302335 #> [99,] 0.3223724808 0.243533007 0.434094512 #> [100,] 0.0556931269 0.351560162 0.592746711 #>