dput a long list - shorten list but preserve structure
问题 If we want to make a reproducible question on a complex/large dataset for SO, we can use dput(head(df)) to reduce the size. Is there a similar approach to reduce the size of complex nested lists with varying list lengths? I'm thinking an approach could be to take the first few elements from each list (say first 3) irrespective of individual list type ( numeric , character etc.) and nested structure but I'm not sure how to do this. #sample nested list L <- list( list(1:10), list( list(1:10),