Re: [R] Subset Rasterbrick by time

2018-06-19 Thread Miluji Sb
Dear David, Subsetting works but the 'date' information is lost in the new file. Thanks, Mike. I was not aware of the bug but will work on learning about (getZ) and (setZ). Thanks again! Sincerely, Milu On Tue, Jun 19, 2018 at 7:32 AM, Michael Sumner wrote: > > > On Mon, 18 Jun 2018, 22:09 D

Re: [R] Subset Rasterbrick by time

2018-06-18 Thread Michael Sumner
On Mon, 18 Jun 2018, 22:09 David Winsemius, wrote: > > > > On Jun 18, 2018, at 7:21 AM, Miluji Sb wrote: > > > > Dear all, > > > > I have a rasterbrick with the date/time information provided which I > would > > like to subset by year. > > > > However, when I use the following code for sub-setti

Re: [R] Subset Rasterbrick by time

2018-06-18 Thread David Winsemius
> On Jun 18, 2018, at 7:21 AM, Miluji Sb wrote: > > Dear all, > > I have a rasterbrick with the date/time information provided which I would > like to subset by year. > > However, when I use the following code for sub-setting; > > new_brick <- subset(original, which(getZ( original ) >= as.D

[R] Subset Rasterbrick by time

2018-06-18 Thread Miluji Sb
Dear all, I have a rasterbrick with the date/time information provided which I would like to subset by year. However, when I use the following code for sub-setting; new_brick <- subset(original, which(getZ( original ) >= as.Date("2000-01-01 10:30:00") & getZ(original ) <= as.Date("2014-12-31 10