
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]]

