I'm running an analysis in R with the Vegan
package. It's really simple in the way that I only want the summary to extract some values. But it keeps telling me an error message. Why?
I have this 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 this 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 this 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 to set an attribute on NULL