Try this:
replace(have, mapply(seq, which(have), which(have) + 3), TRUE)
On Fri, Oct 8, 2010 at 2:07 PM, andrewjt wrote:
>
> Hello,
> I need help getting from data$HAVE to data$NEED (see below). This requires
> replacing every TRUE in data$HAVE with 4 TRUE(s) in data$NEED.
>
> Any ideas? It see
Hello,
I need help getting from data$HAVE to data$NEED (see below). This requires
replacing every TRUE in data$HAVE with 4 TRUE(s) in data$NEED.
Any ideas? It seems straight forward but I can't figure it out!
Thanks in advance
HAVE NEED
1 FALSE FALSE
2 FALSE
2 matches
Mail list logo