pca - RDA analysis in R gives error "attempt to set an attribute on NULL" -


i'm running analysis in r vegan package. it's simple in way want summary extract values. keeps telling me error message. why?

i have dataset

feed.raw1 =structure(c(0l, 0l, 2l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l,              5l, 0l, 2l, 0l, 0l, 0l, 0l, 0l, 0l, 2l, 0l, 7l, 11l, 3l, 1l,              0l, 1l, 0l, 0l, 0l, 0l, 0l, 0l, 1l, 2l, 0l, 0l, 0l, 0l, 0l, 0l,              0l, 0l, 0l, 0l, 3l, 0l, 5l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 2l, 0l, 0l, 8l, 7l, 5l, 1l,              0l, 0l, 1l, 0l, 0l, 0l, 0l, 0l, 10l, 5l, 0l, 0l, 1l, 0l, 0l,              0l, 0l, 0l, 0l, 0l, 1l, 5l, 0l, 0l, 8l, 9l, 0l, 0l, 5l, 0l, 0l,              0l, 1l, 0l, 0l, 0l, 1l, 0l, 0l, 0l, 1l, 0l, 0l, 0l, 15l, 0l,              51l, 10l, 0l, 0l, 0l, 0l, 2l, 0l, 0l, 0l, 0l, 2l, 0l, 0l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 0l, 1l, 3l, 0l, 1l, 0l, 0l, 0l, 0l, 0l,              0l, 0l, 0l, 45l, 203l, 17l, 54l, 4l, 1l, 0l, 0l, 0l, 0l, 10l,              9l, 0l, 0l, 0l, 2l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 12l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 2l, 0l, 22l, 206l, 9l, 16l, 1l,              1l, 6l, 6l, 0l, 0l, 4l, 5l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l,              0l, 7l, 0l, 0l, 3l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l,              2l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 12l, 3l, 1l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 23l, 4l, 1l, 2l, 0l, 2l, 0l, 0l, 0l,              0l, 0l, 0l, 0l, 0l, 76l, 0l, 96l, 0l, 1l, 0l, 0l, 0l, 0l, 0l,              11l, 0l, 3l, 1l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 270l,              144l, 7l, 8l, 15l, 6l, 6l, 2l, 6l, 1l, 25l, 5l, 0l, 1l, 1l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 14l, 2l, 1l, 0l, 0l, 0l, 0l,              0l, 3l, 0l, 0l, 0l, 3l, 2l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l,              0l, 2l, 1l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 2l, 1l, 0l,              0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 2l, 7l, 0l, 0l, 0l, 0l, 0l,              0l, 14l, 1l, 0l, 0l, 0l, 0l, 0l, 1l, 0l, 0l, 1l, 0l, 0l, 0l,              0l, 0l), .dim = c(12l, 32l), .dimnames = list(c("a", "b", "c",                                                              "d", "e", "f", "g", "h", "i", "j", "k", "l"), c("a", "b", "c",                                                                                                              "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",                                                                                                              "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a1", "b1",                                                                                                              "c1", "d1", "e1", "f1"))) 

and i'm running analysis:

library(vegan) feed_raw.hel = decostand(feed.raw1, method = "pa")  pca.feed=vegan::rda(feed_raw.hel, scale=false)  head(summary(pca.feed)) 

it gives me error:

canonical correspondence analysis  class: rda cca call: rda(x = feed_raw.hel, scale = false)  total inertia: 0  eigenvalues: error in names(vec) <- paste("ax", 1:length(vec), sep = "") :    attempt set attribute on null 

no error found (see comments in op):

> library(vegan) > feed_raw.hel = decostand(feed.raw1, method = "pa") > > pca.feed=vegan::rda(feed_raw.hel, scale=false) > head(summary(pca.feed))  call: rda(x = feed_raw.hel, scale = false)  partitioning of variance:               inertia proportion total           5.394          1 unconstrained   5.394          1  eigenvalues, , contribution variance  importance of components:                          pc1    pc2    pc3    pc4     pc5     pc6     pc7 eigenvalue            2.0696 0.7676 0.6639 0.5502 0.41578 0.31941 0.22209 proportion explained  0.3837 0.1423 0.1231 0.1020 0.07708 0.05922 0.04117 cumulative proportion 0.3837 0.5260 0.6491 0.7511 0.82817 0.88739 0.92856                           pc8     pc9    pc10    pc11 eigenvalue            0.15383 0.11310 0.07857 0.03984 proportion explained  0.02852 0.02097 0.01457 0.00739 cumulative proportion 0.95708 0.97805 0.99261 1.00000  scaling 2 species , site scores * species scaled proportional eigenvalues * sites unscaled: weighted dispersion equal on dimensions * general scaling constant of scores:  2.775394   species scores            pc1      pc2      pc3      pc4        pc5      pc6    -0.03289 -0.13245  0.18066  0.12616 -0.2028751  0.07257 b    -0.19170 -0.26686 -0.20142 -0.16621  0.0739356 -0.16726 c    -0.43542 -0.24013 -0.02194  0.16668 -0.0037653  0.18018 d    -0.43702  0.08614 -0.05548 -0.06814 -0.0009418 -0.03947 e    -0.24815 -0.06070  0.29795  0.18439 -0.0879021 -0.02246 f     0.08852  0.11597 -0.07947  0.02250 -0.0926734 -0.13060 ....                                                       site scores (weighted sums of species scores)            pc1      pc2      pc3     pc4     pc5     pc6    -1.65813  0.55267  0.90341  0.4485  0.8856 -0.7321 b    -1.70818  0.11084 -1.33080 -0.9734 -0.8929  0.4280 c    -0.25333 -1.02024  1.39160  0.9718 -1.5627  0.5590 d    -0.09478 -1.47685 -1.03494  1.1078  1.2228 -0.2536 e     0.26417  0.60502  0.71856 -0.6194  1.1614  1.2200 f     0.36048 -0.01608 -0.09826 -0.2709  0.3182  1.3866 .... 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -