I failed at searching for how to do this specific transformation. Does anyone have a smart way to achieve this? sorry if I missed an obvious answer somewhere. thanks
# start with a single vector
1:3
# achieve this desired structure, containing every combination
# from combn( x , 1 ) thru combn( x , length( x ) )
list(
1 ,
2 ,
3 ,
c( 1 , 2 ) ,
c( 1 , 3 ) ,
c( 2 , 3 ) ,
c( 1 , 2 , 3 )
)