Hi all, I generally use the Reduce() function to reduce the dimension of
list object. However in my current session I have few objects which are
actually list of list of list..(say n step). If I reduce their dimension
then I have call Reduce() function many times. Therefore my question is, is
there any 1-step way to reduce the dimension at the lowest level? Take this
example:

 

lis1 <- list(4)

lis2 <- list(1,8)

lis3 <- list(lis1, lis2)

 

# Now I want to reduce the dimension of lis3 to a column vector:

 

> Reduce("c", Reduce("c", lis3))

[1] 4 1 8

 

I want to have some mechanism so that I need not to call reduce() function
twice. Is there any way to do that?

 

Thanks and regards,


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to