
Check if two objects have identical structure
Source:R/identical_structure.R
identical_structure.RdThis function determines whether two objects have the same structure, where
two lists have the same structure if they have the same length and their elements (compared in order and recursively) have the same
modeand length,and two other objects have the same structure if they have the same
classand the same dimension (or the same length, if they have no dimension).
Note that concrete values, names, and other attributes are not compared.
References
Inspired by https://stackoverflow.com/a/45548885/15157768.