[R-sig-Geo] [FORGED] Modifying the length of a matrix variable

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Sat Mar 30 23:49:07 CET 2019


On 31/03/19 11:14 AM, rain1290 using aim.com wrote:

> Hi Rolf (and others),
> 
> I tried your suggestion, but when I used dim(Model4.chopped), it still 
> shows 95 layers, as shown below:
> 
> 8192    95
> 
> I also find that the total number of cells is rather low for that many 
> layers. I started with 778240 cells over 95 layers.

Well then you're doing something wrong, or there is something that you 
haven't told us.

E.g.:
> junk <- array(runif(64*128*95),dim=c(64,128,95))
> junk.chopped <- junk[,,1:90]
> dim(junk)
> [1]  64 128  95
> dim(junk.chopped)
> [1]  64 128  90

Perhaps Model.4 has some structure other than that of an array. 
(Originally you said it was a matrix.)

You really need to get your terminology and ideas *clear* in order to 
have any hope of receiving useful advice.

I have no idea what you are on about in respect of "the number of 
cells".  My mind-reading machine is in the repair shop.  I strongly 
suspect that your thoughts are confused.

cheers,

Rolf

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-sig-Geo mailing list