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

Give informative error message in boot_networklevel when lst is not a list #18

Open
valentinitnelav opened this issue Dec 10, 2019 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@valentinitnelav
Copy link
Owner

Below, the error message is not that informative:

library(bootstrapnet)
library(bipartite)
data(Safariland)

nest <- Safariland %>% 
  web_matrix_to_df() %>%
  boot_networklevel(col_lower = "lower", # column name for plants
                    col_higher = "higher", # column name for insects
                    index = "nestedness",
                    level = "both", # here, nestedness is not affected by level
                    start = 100,
                    step = 50,
                    n_boot = 30,
                    n_cpu = 3)

Gives

Error in function_list[[k]](value) : 
  `data` must be a data.frame or data.table.  Maybe check out the function web_matrix_to_df() for examples.

Should actually inform that the user didn't provide a list object (in this case it can be a list of one element containing the needed data).

@valentinitnelav valentinitnelav added bug Something isn't working enhancement New feature or request labels Dec 10, 2019
@valentinitnelav valentinitnelav self-assigned this Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant