Skip to content
Prev 385978 / 398502 Next

Please need help to finalize my code

Hi.

Maybe you will get better answers, but from your code it seems to me that you are treating R as C or other similar language which is not optimal. Considering your first 9 lines, it could be changed either to

CenteringV <- function(X, Ms, n) X-Ms

or you probably could use functions sweep or scale.
Your other code is beyond my experience, sorry.

Cheers
Petr