SUCCESS! Thank you so, so much, Stephen! Indeed, that worked out well, and 
dim(subset) shows:
64   128    90
I am very, very grateful for this! Thanks to the others, too, for their 
assistance with this!

-----Original Message-----
From: Stephen Stewart <stephen.stewar...@gmail.com>
To: Rolf Turner <r.tur...@auckland.ac.nz>
Cc: rain1290 <rain1...@aim.com>; R-sig-geo Mailing List 
<r-sig-geo@r-project.org>
Sent: Sat, Mar 30, 2019 8:16 pm
Subject: Re: [R-sig-Geo] [FORGED] Modifying the length of a matrix variable

The last few messages provided important information which was previously 
absent. Try:

subset = Model4[[1:90]] 

This will subset the brick to layers 1 through 90.

I would also suggest some further reading around the raster package and NetCDF 
files (e.g. the ncdf4 package) would be useful to you.

On Sun, 31 Mar 2019 at 11:06, Rolf Turner <r.tur...@auckland.ac.nz> wrote:


On 31/03/19 12:56 PM, rain1...@aim.com wrote:

> Model4 <- brick("MaxPrecCCCMACanESM2rcp45.nc", var="onedaymax")
> 
> 
> That is how Model4 is derived.
> 
> When trying class(Model4), I receive:
> 
> [1] "RasterBrick" attr(,"package") [1] "raster"
> 
> **//___^
> 
> Meanwhile, I will check on Google to see what I come up with in terms of 
> your suggestion. :)

I know nothing about rasters, the brick() function, or the raster 
package, so include me out at this stage.

Others on the list may be able to help you.  Particular if you can force 
yourself to ask a *focussed* question.

cheers,

Rolf

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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to