On Sat, Nov 11, 2006 at 05:22:30AM +0000, Prof Brian Ripley wrote:
> I don't see how this code can work at all. '[<-.data.frame' does not 
> accept three arguments, e.g.
> 
> >women[1,2,3] <- 17
> Error in `[<-.data.frame`(`*tmp*`, 1, 2, 3, value = 17) :
>         unused argument(s) (3)
> 
> If df is in fact a three-dimensional array you can do

Sorry for the late reply.  Yes, df was indeed array(0, c(20, 30, 30)) --
sorry for the confusion!

> df[1:20, 1:30, 20] <- df[1:20, 1:30, 27] + df[1:20, 1:30, 30]

I now tried this myself and the code got quite fast, thank you!

-S.

______________________________________________
[email protected] 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.

Reply via email to