Lorenzo,

Given that solution, I think you can also express this (in a memory-safe
fashion) like this :

CRPS  <- overlay(obs, pred, fun=function(x,y) crps(x, y)$crps)

Robert

On Tue, Nov 27, 2012 at 3:11 AM, Lorenzo Alfieri <alfios17@hotmail.com>wrote:

>
> Etienne,
> thank you for the tip
> Now it runs trough, by using
>
> CRPS <- raster(ncol=10, nrow=10)
> CRPS[] <- crps(obs[],pred[])$crps
>
> Lorenzo
>
>
> Date: Mon, 26 Nov 2012 21:37:13 -0500
> Subject: Re: [R-sig-Geo] calculate CRPS on rasters
> From: etiennebr@gmail.com
> To: alfios17@hotmail.com
> CC: r-sig-geo@r-project.org
>
> Lorenzo,
>
> I don't know about your specific function, but you can access matrix using
> the []'s. So maybe something like :
> CRPS <- raster(ncol=10, nrow=10)
> CRPS[] <- crps(obs[],pred[])
>
>
> Etienne
>
> 2012/11/26 Lorenzo Alfieri <alfios17@hotmail.com>
>
> CRPS <- raster(ncol=10, nrow=10)
>
> for (i in 1:length(obs)){
>
>   CRPS[i] <- crps(obs[i],pred[i])$CRPS
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

