-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
The issue appears when a table is named T (e.g., for traits). In this case, the randtest.rlq methods (but it should be the same for other methods that use 'eval' to retrieve objects) wrongly evaluates the object (as TRUE instead of the data.frame) but the code runs wrongly without returning any error.
E <- data.frame(matrix(rnorm(30), nrow = 15))
T <- data.frame(matrix(rnorm(30), nrow = 10))
L <- data.frame(matrix(rpois(lambda = 15, 150), nrow = 15))
coa <- dudi.coa(L, scannf = FALSE)
pcaT <- dudi.pca(T, row.w = coa$cw, scannf = FALSE)
pcaE <- dudi.pca(E, row.w = coa$lw, scannf = FALSE)
rlq1 <- rlq(pcaE, coa, pcaT, scannf = FALSE)
sum(rlq1$eig)
randtest(rlq1)
Solution would be to correctly manage the original object T or at least returns an error.