How can we allocate dynamic arrays in R or S-plus?

i am generating random #s and then allocating them to run over summation ,and to calculate this summand i need to use 3-d array so my arrays size is dynamic how do i do this in R

Answer:
not sure I understand,

can you simple concat the numbers to your array and reassign

dim(a)
[1] 2 3 4

b <- c(a,1:6)

dim(b)<-c(2,3,5)

b
> b
, , 1

[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6

, , 2

[,1] [,2] [,3]
[1,] 7 9 11
[2,] 8 10 12

, , 3

[,1] [,2] [,3]
[1,] 13 15 17
[2,] 14 16 18

, , 4

[,1] [,2] [,3]
[1,] 19 21 23
[2,] 20 22 24

, , 5

[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6

The answers post by the user, for information only, FunQA.com does not guarantee the right.



More Questions and Answers:
  • May i know what the different of single side band suppressed carrier and double side band suppressed carrier?
  • Without modern surveying equipment,how did diggers know direction and depth to dig to in the city / spring?
  • In the first semester in india..of engineering...what topics do we study in PCM...?
  • What way to be a software engineer?
  • Is there a way to lower voltage ?
  • Which is better -B tech. IT or Electronics?
  • Is it possible to have a unlimited powersuply made from water or electricity?
  • Can I use a Car alternator for a wind turbine?
  • Is it possible to increase the energy of a system by supplying it with electrical energy? In what form?