Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer_morphospace_LDA issue #218

Open
lrocax opened this issue Feb 20, 2021 · 8 comments
Open

layer_morphospace_LDA issue #218

lrocax opened this issue Feb 20, 2021 · 8 comments

Comments

@lrocax
Copy link

lrocax commented Feb 20, 2021

Hi,

What I do wrong with the layer_morphospace_LDA script as I get this error:
Error in x$mod.pred$x[, axes] : subscript out of bounds

library(Momocs)

lf <- list.files("C:/Data/outline/", pattern = ".txt$",full.names=TRUE)
lf1<-lf_structure(lf, split = "C:/ Data /outline/", trim.extension = FALSE)
lf2<-data.frame(substr(lf1$V2, 1, 5))
names(lf2)[1] <- "Type"

coordinates <- import_txt(lf)
do <- Out(coordinates, fac = lf2)

do.f <- efourier(do, nb.h=32, norm=TRUE)

do.p <- PCA(do.f)

do.l <- LDA(do.p, ~Type)
plot_LDA(do.l)
plot_LDA(do.l, 'Type') + layer_morphospace_LDA(do.l)

@vbonhomme
Copy link
Collaborator

vbonhomme commented Feb 20, 2021 via email

@vbonhomme
Copy link
Collaborator

vbonhomme commented Feb 20, 2021 via email

@lrocax
Copy link
Author

lrocax commented Feb 21, 2021

I have in the dataset three groups (If you mean two levels as two groups than)

@vbonhomme
Copy link
Collaborator

vbonhomme commented Feb 22, 2021 via email

@vbonhomme
Copy link
Collaborator

vbonhomme commented Feb 22, 2021 via email

@lrocax
Copy link
Author

lrocax commented Mar 5, 2021

I tried plot_LDA(do.l) + layer_morphospace_LDA() and I got this error:

  • layer_morphospace_LDA is back, but experimental
    Error in layer_morphospace_LDA() :
    argument "x" is missing, with no default

@vbonhomme
Copy link
Collaborator

vbonhomme commented Mar 6, 2021 via email

@lrocax
Copy link
Author

lrocax commented Mar 6, 2021

I also got an error:

  • layer_morphospace_LDA is back, but experimental
    Error in apply(coo, 2, function(x) diff(range(x))) :
    dim(X) must have a positive length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants