I am looking for the easiest way to strip my nested list of all non numeric values or to only return those lists (df) and components that are numeric. I don't mind it being flattened but I want it in a format I can work with as numerics. I am sure there is some way clever way of doing with purrr but not entirely sure how best to approach it.
This is definitely a start but I would like to preserve some of the complex list structure. So either I would like to take out all the non numeric bits or only return that structure with those still containing lists with numbers or vectors or dataframes with numbers/numeric.
I can propose a shorter alternative, but it only indicates the structure, doesn't preserve it. @pieterjanvc 's solution would is best for preserving the full structure.
Thank you Pieter! You're right I did mention flattened wouldn't be a problem. That would work for most cases but I could have a point at which that would lead to some errors in this specific problem.
Thanks for the recursive function to solve this problem! This should help me with what I need to get these similar enough for comparison now with waldo