Dear Kara,
Did you bother to test your code? You say your code actually did some
summing, but you didn't include any working example of that code. Did you
bother to read the posting guide?
(1) TRY to reference Col A (including space, as you indicated) in df.
>names(df)<-c("Col A", "Col B") #space
WIll this do it for you:
> x <- read.table(textConnection("ColA ColB
+ 10
+ 30
+ 21
+ 20
+ 10
+ 40
+ 11
+ 91
+ 30
+ 50
+ 21"), header=TRUE)
> closeAllConnections()
> x.s <- split(x, cumsum(x$ColB))
> x.l <- do
2 matches
Mail list logo