Skip to content

could we use ":" to represent multiple matrice in a list or sequential chracter names

3 messages · zhijie zhang, David Winsemius, Dennis Murphy

#
On Jan 19, 2010, at 10:57 PM, rusers.sh wrote:

            
> agb <-array( , dim=c(3,2,3,2))
 > agb[1,,,] <- a1
 > agb[2,,,] <- a2
 > agb[3,,,] <- a3

 > agb[1:3 , 1, 2, 1]
[1] 3 2 0
Yes, not correct.
In both your examples the interpreter reduces the expression to 3:0  
and that results in 3 2 1 0