Skip to content
Prev 388456 / 398513 Next

Some difficulties to use the apply command on an array

Hi Laurent,
I am not sure how to get apply()  to work but the following uses lapply()
and returns the matrices in a list.

lapply(1:3, FUN = function(i) diag( svd(x[i,,])$d ))

HTH,
Eric
On Mon, Jul 5, 2021 at 5:56 PM Laurent Rhelp <LaurentRHelp at free.fr> wrote: