Hi Lyndal,
Could you please send me your datasets to my personal e-mail (luis.m...@gmail.com) so I can have a closer look.
Cheers,
Luis
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dartr+un...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/dartr/ed8ffdf8-e6cd-4edf-a612-6425ddf5d31cn%40googlegroups.com.
Hi,
I’m trying to merge multiple genlight datasets at once using gl.join(x1, x2, method = "join.by.loc"), but I think it can only handle merging a maximum of two datasets. When I need to merge more than two, I have to do it step-by-step.
Is there an efficient way to merge several genlight objects in one go, especially when they share the same marker set? In some cases, I also need to use the code Luis shared to check whether the marker order is consistent.
I really appreciate everyone’s help. Thanks.
Warm regards,
Rizki
Hi Rizki,
You are right that gl.join() is designed to merge two genlight objects at a time. However, you can efficiently extend this to multiple objects by applying it iteratively over a list using Reduce(). This avoids manual, step-by-step joins and works well when all datasets share the same marker set. For example:
Cheers,
Luis