Skip to content
Prev 393751 / 398503 Next

implicit loop for nested list

Is this what you want:

## This cbinds all the 2 matrix components of mysim
## producing a 2 x 20 matrix
do.call(cbind,lapply(mysim,`[[`,1))

## Change the 1 to a 2 to cbind the other components.

Cheers,
Bert

Tha

On Thu, Jan 26, 2023 at 7:33 PM Naresh Gurbuxani <
naresh_gurbuxani at hotmail.com> wrote:

            

  
  
Message-ID: <CAGxFJbS3Km+aJ7z4o3Z=9gico+iVrfVnYVQ8_rmbh7DtU5uGDA@mail.gmail.com>
In-Reply-To: <IA1P223MB0499C5015DF59BAB5A6D540AFACC9@IA1P223MB0499.NAMP223.PROD.OUTLOOK.COM>