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

In sample_indices() function, the stop event doesn't pass the correct number of rows #16

Open
valentinitnelav opened this issue Nov 14, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@valentinitnelav
Copy link
Owner

valentinitnelav commented Nov 14, 2019

doubtful_data <- web_matrix_to_df(Safariland) %>% unique()
boot_networklevel(lst = list(s1 = doubtful_data),
                  col_lower = "lower",   # column name for plants
                  col_higher = "higher", # column name for insects
                  index = "nestedness",
                  level = "both",
                  start = 50,
                  step = 1,
                  n_boot = 4,
                  n_cpu = 2)

# Error in sample.int(length(x), size, replace, prob): cannot take a sample larger than the population # when 'replace = FALSE'

# Error in value[[3L]](cond) : 
# Possibly because your `start` value, 50, is bigger than the number of interactions in data, 1130.
# If this is the case, then consider to reduce `start` to maybe 10 % of your interactions.

boot_networklevel(lst = list(s1 = doubtful_data),
                  col_lower = "lower",   # column name for plants
                  col_higher = "higher", # column name for insects
                  index = "nestedness",
                  level = "both",
                  start = 10,
                  step = 50,
                  n_boot = 4,
                  n_cpu = 2)

# Error in cut.default(x = seq_along(x), breaks = n, labels = FALSE): invalid number of intervals

# Error in value[[3L]](cond) : 
# Possibly because your `step` value, 50, is bigger than the number of interactions in data, 1130.
# If this is the case, then consider to reduce `step` to maybe 5-10 % of your interactions.

It should not be 1130 interactions in data, but 39 (nrow(doubtful_data)). Not sure what is happening?

@valentinitnelav valentinitnelav added the bug Something isn't working label Nov 14, 2019
@valentinitnelav valentinitnelav self-assigned this Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant