Skip to main content
4 events
when toggle format what by license comment
Jul 29, 2020 at 12:46 comment added Stef Thanks! I didn't know that R used 1-indexing.
Jul 29, 2020 at 12:40 comment added Giuseppe @Stef a[2] is the second element (R uses 1-based indexing), and the array of guaranteed to have at least 3 elements.
Jul 29, 2020 at 12:05 comment added Stef How do you know that a[2] is one of the repeated values and not the unique value? After sorting, the unique value must be either the first or last element. But couldn't a[2] be the last element?
Jul 28, 2020 at 14:48 history answered Robin Ryder CC BY-SA 4.0