Martin, Suharto, et al.,
On Wed, Oct 18, 2017 at 9:54 AM, Martin Maechler wrote:
> **
>
> > Note: In theory, if function 'factor' merged duplicated 'labels' in
> all cases, at least in
> > factor(c(sqrt(2)^2, 2)) ,
> > function 'factor' could do matching on original 'x' (without
>
> Suharto Anggono Suharto Anggono via R-devel
> on Sun, 15 Oct 2017 16:03:48 + writes:
> In R devel, function 'factor' has been changed, allowing and merging
duplicated 'labels'.
Indeed. That had been asked for and discussed a bit on this
list from June 14 to June 23, start
> Martin Maechler
> on Mon, 16 Oct 2017 19:13:31 +0200 writes:
> Stephen Berman
> on Sun, 15 Oct 2017 01:53:12 +0200 writes:
> > (I reported the test failure mentioned below to R-help but was advised
> > that this list is the right one to address the issue; in th
The binary tree algorithm does not need additional scrambling. I have
written the R code for the algorithm in the last answer at:
https://stackoverflow.com/questions/311703/algorithm-for-sampling-without-replacement/46807110#46807110
However, the algorithm will probably be outperformed by hash t
Thank you for your answer. Certainly, hash table must be faster than
binary tree.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Splus used a similar method for sampling from "bigdata" objects. One
problem was that sample() is used both for creating a sample and for
scrambling the order of a vector. Scrambling the order of a big vector
wastes time. It would be nice to be able to tell sample() that we don't
care about the
> From: "Pavel S. Ruzankin"
> Let us consider the current uniform sampling without replacement
> algorithm. It resides in function do_sample in
> https://svn.r-project.org/R/trunk/src/main/random.c
> Its complexity is obviously O(n), where the sample is selected from
> 1...n, since the algorith
See also:
P. Gupta, G. P. Bhattacharjee. (1984) An efficient algorithm for random
sampling without replacement. International Journal of Computer
Mathematics 16:4, pages 201-209.
http://dx.doi.org/10.1080/00207168408803438
Teuhola, J. and Nevalainen, O. 1982. Two efficient algorithms for random
Hello,
I’ve tried to have a wrapper function of seq.Date(), saying seq_date(). The
seq_date() function takes exactly the same arguments and the defaults as
seq.Date(). The seq_date() is expected to return the same results as
seq.Date(), but it triggers an error in seq.Date(). The little reproducib
If somebody is interested I can write the code. But somebody else has to
add the code for handling int / long int / double cases, since I do not
have enough experience in that.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinf
10 matches
Mail list logo