Skip to content

error with network.2 function #26

@matevzl533

Description

@matevzl533

Hello,

I would really like to use your package for the analysis of my microbiome project, however I get an error with network.2 function:

Error in `geom_point()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error in `rlang::sym()`:
! Can't convert a function to a symbol.
Run `rlang::last_trace()` to see where the error occurred.

This is the backtrace:

Backtrace:

  1. ├─global network.2(...)
  2. │ └─ggtern::ggsave(plotname, pnet, width = 11, height = 9)
  3. │ ├─grid::grid.draw(plot)
  4. │ └─ggtern:::grid.draw.ggplot(plot)
  5. │ ├─base::print(x)
  6. │ └─ggtern:::print.ggplot(x)
  7. │ ├─ggtern::ggplot_build(x)
  8. │ └─ggtern:::ggplot_build.ggplot(x)
  9. │ └─ggint$by_layer(...)
  10. │ ├─rlang::try_fetch(...)
  11. │ │ ├─base::tryCatch(...)
  12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  15. │ │ └─base::withCallingHandlers(...)
  16. │ └─ggtern (local) f(l = layers[[i]], d = data[[i]])
  17. │ └─l$compute_aesthetics(d, plot)
  18. │ └─ggplot2 (local) compute_aesthetics(..., self = self)
  19. │ └─base::lapply(aesthetics, eval_tidy, data = data, env = env)
  20. │ └─rlang (local) FUN(X[[i]], ...)
  21. └─rlang::sym(fill)

I call the function with this code:

result = network.2(ps = bacteria_organs_common.ps, N = 100, r.threshold=0.6, big = T,
                   select_layout = F, group = "Organ_Source", fill = "Phylum",
                   p.threshold=0.05, label = FALSE, path = path , zipi = F, ncpus = 8)

Can you give me please some advice, if I am doing something wrong or how to go around the error.

Best

Matevz

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