structural_type <- function(x) { capture.output(str(x, vec.len = 0, give.attr = FALSE)) }