Skip to content

Accessing the index of factor in by() function

2 messages · Ista Zahn, Merik Nanish

#
Hi Merik,
Please keep the mailing list copied.
On Tue, Jul 26, 2011 at 6:44 AM, Merik Nanish <merik.nanish at gmail.com> wrote:
Can you be more specific? What is the problem you are having?

And no, that's not what I'm looking
OK, easy enough:

dat.tmp <- data.frame(id, month, value)
my.plot <- function(dat) {print(dat[, c("id", "value")])}
by(dat.tmp, id, my.plot)
Why? What do you have against loops?

Best,
Ista

  
    
1 day later