Closed minhnd212 closed 2 weeks ago
apply()
is nothing but a for loop as wellapply()
works for you, then you can apply it on X[, ind, drop = FALSE]
.I am sorry for the late reply. I ran into the same problem that I wrote in the other post, which is to use the big_apply() function properly, so if I can get some more details on how to write the big_apply() function properly for what I am trying to do, I believe this issue will be resolved as well. Thank you
Please share what you've tried with big_apply()
, we'll go from there.
Any update on this?
Hi, I wish to use the big_apply() function in the same manner as apply(). I went through the function's documentation and noticed that big_apply() applies to an a.FUN that calls another function that can perform calculations on a GROUP of columns, such as colSums(), rowSums(), etc., and which group of columns to be calculated are based on the ind argument.
However, my a.FUN calls another function that can perform calculations on ONE column at a time only (instead of a group of columns). I can program the function so that it can perform calculations on a group of columns by using a for loop, but then it defeats the purpose of using big_apply() or apply(), which is to avoid using the for loop, if I understand correctly.
Could you give me a suggestion on how I can go about solving this problem? Thank you.