Try this:

with(DF, tapply(Time, list(Start, End), mean))


On Thu, Oct 7, 2010 at 8:40 AM, sugimoto <ieyasu@sugimoto.at> wrote:

>
> Hi,
>
> I have the following problem:
> I have a list of entries with vehicles going from some places to others and
> the time that they need.
> e.g.
> Vehicle Start End Time
>    1        A       B    5
>    2        A       C    4
>    3        A       C    3
>    4        B       A    6
>    5        B       C    4
>    6        B       C    6
>    7        C       B    2
>    8        C       B    4
>    9        A       B    7
>
> What I need is a 2d table with the average time needed from Start to End,
> e.g.
>        A       B       C
> A     NA     6       3.5
> B     6        NA    5
> C    NA     3       NA
>
>
> Any help would be very much appreciated,
> Sugi
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Create-2d-table-with-mean-of-entries-tp2966610p2966610.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]

