Perhaps:


[[1]]
  x          v
1 1  1.0565171
2 2 -0.8273003
3 3  1.0614944
4 4  2.6897433
5 5  0.7371014
6 6 -1.3192476

[[2]]
  x          v
1 1  1.7267265
2 2 -0.2470332
3 3 -0.1667343
4 4 -0.4970180
5 5 -1.0597913
6 6  0.3742491

[[3]]
  x          v
1 1  1.3846207
2 2  0.7995231
3 3 -0.6818515
4 4  0.4711960
5 5  1.9666241
6 6 -0.1185372

[[4]]
  x          v
1 1 -1.6236832
2 2  0.9617151
3 3  1.1262914
4 4  0.2224509
5 5  1.2749641
6 6 -0.2390259
df_out <- matrix(0, ncol=ncol(df1), nrow=nrow(df1))
for(i in 1:ncol(df1)){

df_out[,i] <- apply(do.call("rbind", lapply(list(df1, df2, df3, df4), "[[",
i)), 2, median)

}





On 22/10/2007, Diogo Alagador <alagador@oniduo.pt> wrote:
>
> Hi all,
>
> I am not a skillful R programmer and has I am handling with large
> dataframes (about 30000 x 300) I am in need of an efficient function.
>
> I have 4 dataframes with the same dimension. I need to generate other
> dataframe with the some dimension than the others where in each position it
> has the median value of the 4 values in the same position coming from the 4
> dataframes.
>
> Grateful by your support,
>
> Diogo André Alagador
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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
> <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]]

