Re: [R] Looping through all matrix columns each 1 row at a time

2022-04-21 Thread Eric Berger
Hi Paul, I am not sure I understand your question, but perhaps the following is helpful. In particular, the apply() function used with MAR=1, applies a function to a matrix row-wise. set.seed(123) m <- matrix(sample(1:6,5*12,replace=TRUE),ncol=12) ## dummy data m [,1] [,2] [,3] [,4] [,5] [,6]

Re: [R] NAs error in caret function

2022-04-21 Thread Carlos Ortega
Hi, I do not see any issue with the code you provided. In this situation, you should use a more "debugging" approach for your problem until catching the problem. In this case, I would start using a much more simplified version of your "trainControl". No folds, just "cv" and "number = 2" and try.