|
|
|
|
|
by gbrown
3778 days ago
|
|
R does actually ship with the ability to byte-compile functions these days, and as that functionality matures it may become the default behavior. It's still better to actually learn the language; it's far easier to optimize something like: apply(X, 1, function(x){
# do stuff to the row of X
})
than: for (i in 1:nrow(X)){
# do stuff to X[i,], and store it somewhere
}
|
|