Skip to content

Errors when tried to reproduce the examples in publication using Rlda #22

@WenChenAAFC

Description

@WenChenAAFC

Hi Pedro,

I tried but failed to reproduce toy examples and analyses in your recent publication: Albuquerque, P.H.M., do Valle, D.R., and Li, D. (2019). Bayesian LDA for mixed-membership clustering analysis: The Rlda package. Knowledge-Based Systems 163, 988-995. doi: https://doi.org/10.1016/j.knosys.2018.10.024.

Below are the errors given in R.

`
library("Rlda")

packageVersion("Rlda")

data("birds")

dim(birds)

str(birds)

set.seed(6584)

head(birds)

z <- rlda.bernoulliMH(data = birds, loc.id = birds$loc.id,

                  n_community = 5, alpha0 = 1, alpha1 = 1,

                  gamma = 0.1, n_gibbs = 500, nadapt = 300,

                  ll_prior = TRUE,

                  display_progress = TRUE)

Error in FUN(X[[i]], ...) :

only defined on a data frame with all numeric variables

In addition: Warning message:

In colnames(dat) == id :

longer object length is not a multiple of shorter object length

I also tried:

z <- rlda.bernoulliMH(data = birds, loc.id = "loc.id",

                  n_community = 5, alpha0 = 1, alpha1 = 1,

                  gamma = 0.1, n_gibbs = 500, nadapt = 300,

                  ll_prior = TRUE,

                 display_progress = TRUE)

Error in matrix(NA, nloc, nspp) : non-numeric matrix extent

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions