Skip to content
Prev 361571 / 398502 Next

apply and cousins

John:

1. Please read and follow the posting guide. In particular, provide a
small reproducible example so that we know what your data and looping
code look like.

2. apply-type commands are *not* vectorized; they are disguised loops
that may or may not offer any speedup over explicit loops.

3. A guess at a possible strategy is to convert character date-time
data to POSIXct dates using as.POSITct and then just choose those rows
with the maximum value . e.g.

x[x==max(x)]

These operations *are* vectorized.

However, this guess might be completely useless with your unspecified
data, so beware.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, Jun 8, 2016 at 9:41 AM, John Logsdon
<j.logsdon at quantex-research.com> wrote: