[R] Odp: (no subject)
Petr PIKAL
petr.pikal at precheza.cz
Thu Nov 13 11:35:42 CET 2008
Hi
r-help-bounces at r-project.org napsal dne 13.11.2008 10:51:39:
> Hi,
>
>
>
> Browse[1]> d4
>
> EVDO_Rev Session_Setup FCA bin counts
>
> 50 NA 0 5 1 1
>
> 51 NA 0 5 2 1
>
> 52 NA 0 5 3 1
>
> 53 NA 0 5 4 1
>
> 54 NA 0 5 5 1
>
> 55 NA 0 5 6 1
>
> 56 NA 0 5 7 1
>
> 57 NA 0 5 8 1
>
> 58 NA 0 5 9 1
>
> 59 NA 0 5 10 1
>
> 60 NA 0 5 11 1
>
>
>
>
>
> ######## #logic for merging rows with FCA 4,5,6 into 4
>
> d4n <- aggregate(d4[,c("counts")], by=list(bin = d4$bin,
> EVDO_Rev=d4$EVDO_Rev, Session_Setup=d4$Session_Setup),sum)
>
>
>
>
> does the above instruction works or not ,if not why
Yes it works, why it shall not work? The question is if it do what you
expect to do. Your command sums counts which belongs to same bin, EVDO_Rev
and Session_Setup, if it is what you want.
If by chance you want to sum counts which have FCA 4, 5 or 6 then
by = list (FCA = FCA %in% c(4,5,6)
could be one option.
Regards
Petr
>
>
>
> Thanks
>
> K.Ravichandra
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list