Re: [R-sig-Geo] raster: stackApply problems..

2019-12-15 Thread Leonidas Liakos via R-sig-Geo
Thank you, I did a Pull Request. Στις Πέμπτη, 28 Νοεμβρίου 2019, 01:25:38 μ.μ. EET, ο χρήστης Roger Bivand έγραψε: On Wed, 27 Nov 2019, Leonidas Liakos via R-sig-Geo wrote: > Thank you for your help! > > I tried to fix stackApply according to your instructions. > >

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-27 Thread Leonidas Liakos via R-sig-Geo
>> 560.1375, 561.7972, 556.2471 >>    : 1, 2, 3, 4, 5, 6, 7 >> >> >> On 11/26/19 7:03 PM, Vijay Lulla wrote: >>> If you read the code/help for `stackApply` and `zApply` >>> you'll se

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-26 Thread Leonidas Liakos via R-sig-Geo
ble/reasonable to me).  IMO, if you want to control the >> ordering of your layers then just use sapply, like how you've >> used for ver_mean.  IMO, this is the only reliable (safe?), and >> quite a readable, way to accomplish what you're trying to do. >> Jus

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-26 Thread Leonidas Liakos via R-sig-Geo
y to accomplish what you're trying to do. > Just my 2 cents. > -- Vijay. > > On Tue, Nov 26, 2019 at 11:19 AM Leonidas Liakos via R-sig-Geo > mailto:r-sig-geo@r-project.org>> wrote: > > I added raster::zApply in my tests to validate the results. > However, the &g

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-26 Thread Leonidas Liakos via R-sig-Geo
difference is zero for all layers > dif > # rename > names(res) <- names(res2) > > Best regards, > > Frederico Faleiro > > On Tue, Nov 19, 2019 at 4:15 PM Leonidas Liakos via R-sig-Geo > mailto:r-sig-geo@r-project.org>> wrote: > > I run the e

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-23 Thread Leonidas Liakos via R-sig-Geo
VA) Italy, TP 267 > jon.sko...@ec.europa.eu Tel: +39 0332 789205 Disclaimer: Views > expressed in this email are those of the individual and do not > necessarily represent official views of the European Commission. > > > > ---

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-22 Thread Leonidas Liakos via R-sig-Geo
spra (VA) Italy, TP 267 > jon.sko...@ec.europa.eu Tel: +39 0332 789205 Disclaimer: Views > expressed in this email are those of the individual and do not > necessarily represent official views of the European Commission. > > > > -

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-20 Thread Leonidas Liakos via R-sig-Geo
yer_names(indices, prefix = "foobar.") > res > > res2 <- stackApply(s, indices, mean) > names(res2) <- layer_names(indices, prefix = "foobar.") > res2 > ### end > > > On Wed, Nov 20, 2019 at 1:36 AM Leonidas Liakos via R-sig-Geo > wrote: >&g

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-19 Thread Leonidas Liakos via R-sig-Geo
l layers > dif > # rename > names(res) <- names(res2) > > Best regards, > > Frederico Faleiro > > On Tue, Nov 19, 2019 at 4:15 PM Leonidas Liakos via R-sig-Geo < > r-sig-geo@r-project.org> wrote: > >> I run the example with clusterR: >> >>

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-19 Thread Leonidas Liakos via R-sig-Geo
I run the example with clusterR: no_cores <- parallel::detectCores() -1 raster::beginCluster(no_cores) ?? res <- raster::clusterR(inp, raster::stackApply, args = list(indices=c(2,2,3,3,1,1),fun = mean)) raster::endCluster() And the result is: > res class?? : RasterBrick dimensions :