Re: [R] Mathematical working procedure of duplicated() function in r

2020-08-04 Thread Greg Snow
Rui pointed out that you can examine the source yourself. FAQ 7.40 has a link to an article with detail on finding and examining the source code. A general algorithm for checking for duplicates follows (I have not examined to R source code to see if they use something more clever). Create an emp

Re: [R] Mathematical working procedure of duplicated() function in r

2020-08-04 Thread Rui Barradas
Hello, R is open source, you can see exactly what is the internal working of any function. You can have access to the code by typing the function's name without parenthesis at an R command line. > duplicated function (x, incomparables = FALSE, ...) UseMethod("duplicated") Now, this tells u

[R] Mathematical working procedure of duplicated() function in r

2020-08-04 Thread K Purna Prakash
Dear Sir(s), I request you to provide the detailed* internal mathematical working mechanism of the following function *for better understanding. *x[duplicated(x) | duplicated(x, fromLast=TRUE), ]* I am having some confusion in understanding how duplicates are being identified when thousands of reco