Re: [R] Use of library(X) in the code of library X.

2014-06-08 Thread Bart Kastermans
Thanks Max and Duncan for the replies. To Max in particular I would say that ready code written in possibly non-optimal style (though I did not read enough of caret to have an opinion on that code in particular) would be good practice too. When I was a professor and I got complaints about other p

Re: [R] Use of library(X) in the code of library X.

2014-06-06 Thread Max Kuhn
That is legacy code but there was a good reason back then. caret is written to use parallel processing via the foreach package. There were some cases where the worker processes did not load the required packages (even when I used foreach's ".packages" argument) so I would do it explicitly. I don't

Re: [R] Use of library(X) in the code of library X.

2014-06-06 Thread Duncan Murdoch
On 06/06/2014 10:26 AM, Bart Kastermans wrote: To improve my R skills I try to understand some R code written by others. Mostly I am looking at the code of packages I use. Today I looked at the code for the caret package http://cran.r-project.org/src/contrib/caret_6.0-30.tar.gz in particular

[R] Use of library(X) in the code of library X.

2014-06-06 Thread Bart Kastermans
To improve my R skills I try to understand some R code written by others. Mostly I am looking at the code of packages I use. Today I looked at the code for the caret package http://cran.r-project.org/src/contrib/caret_6.0-30.tar.gz in particular at the file R/adaptive.R This file starts with: