Closed PoGibas closed 1 year ago
.simplify=FALSE
would get rid of NULLs, and will convert any list of one dataframe to simply a dataframe (for both resources and methods). If one runs LIANA with multiple methods, they get a list of method dataframes, if ran on multiple methods and resources, they get a list of lists with dataframes.
liana_aggregate
is intended to be used only when aggregating multiple methods (so it expects a list, and will hence fail when working on a single method - nothing to aggregate). It also expects the output to be simplified
liana_aggregate
will also work on a single resource at a time (so one needs to provide a resource name, if multiple methods and resources are ran via liana_wrap
)
There is an option to run
liana::liana_wrap
with.simplify = FALSE
(this parameter might be useful to keep consistent output when running single or multiple methods). For example:However, I run into errors when trying to run
liana::liana_aggregate
on these outputs:What should be the correct compatibility between
.simplify = FALSE
andliana::liana_aggregate
? My whole question came from the problem when I'm trying to run analysis on the single method and then pipe result to aggregation, but since output is not a list then aggregation fails.