Closed jakobbossek closed 8 years ago
thx looks good.
one mini question: isnt it in these cases better not to use dotargs but to explicitly write down the args? (na.rm and so on).
for command completion and clearness sake?
(i would also merge without this)
one mini question: isnt it in these cases better not to use dotargs but to explicitly write down the > args?
What do you mean by these cases? Functions with few parameters?
for command completion and clearness sake? (i would also merge without this)
Well, yeah these dots always make it harder for code completation, but at least clearness is given by the docs.
If you want, I can drop the dotargs.
What do you mean by these cases? Functions with few parameters?
i am not sure. i think so :) i just thought about it here.
If you want, I can drop the dotargs.
you decide. i think it might be better, but will merge both versions
Then merge plz. We can still change this later.
I will update NEWS in the master branch afterwards.
Just out of curiosity, as getMaxIndex
is C and supposedly fast is then -as.numeric(x)
not a bad practice as it generates some overhead by copying and stuff?
library(microbenchmark)
library(ggplot2)
library(BBmisc)
x = rnorm(10000)
res = microbenchmark(getMinIndex(x), getMaxIndex(x), times = 1000, control = list(warmup = 1000))
autoplot(res)
Just out of curiosity, as getMaxIndex is C and supposedly fast is then -as.numeric(x) not a bad practice as it generates some overhead by copying and stuff?
yes. but if you leave that insight here in the closed PR it will be lost.
Simple wrapper for get{Min,Max}Index.