Skip to content

space-time kriging

7 messages · Pınar Aslantas Bostan, Tom Gottfried, Edzer Pebesma

#
Hi Pinar,

as you say, some data are missing, but the way you create index suggests
none are missing. Does your table "prec" have information for each
observation on which location and at which time it has been taken? Could
you maybe show how prec[1:10,] looks like?

Wbr,
On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:

  
    
#
Hi Edzer,

Thank you for your mail. 
Prec data has location and time information.
Station      X       Y   Prec Year Month Day
1    17020 693894 4931348 1274.4 1970     1   1
2    17020 693894 4931348 1134.3 1971     1   1
3    17020 693894 4931348  940.7 1972     1   1
4    17020 693894 4931348 1253.3 1973     1   1
5    17020 693894 4931348  940.8 1974     1   1
6    17020 693894 4931348  913.4 1975     1   1
7    17020 693894 4931348  895.3 1976     1   1
8    17020 693894 4931348  803.5 1977     1   1
9    17020 693894 4931348  993.1 1978     1   1
10   17020 693894 4931348  976.4 1979     1   1


-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma
Sent: Friday, July 01, 2011 2:50 PM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] space-time kriging

Hi Pinar,

as you say, some data are missing, but the way you create index suggests
none are missing. Does your table "prec" have information for each
observation on which location and at which time it has been taken? Could
you maybe show how prec[1:10,] looks like?

Wbr,
On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:

  
    
#
You could try

index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year)))

Tom


Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:

  
    
#
Thank you Tom! Now index is correct, comprised from 5365 record. I created STSDF object with this index.

Best regards,
Pinar

-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Tom Gottfried
Sent: Friday, July 01, 2011 3:35 PM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] space-time kriging

You could try

index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year)))

Tom


Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:

  
    
#
Pinar / Tom,

another route you might follow is (improvised):

require(spacetime)
prec_data$YearDate = as.Date(paste(prec_data$Year, "1", "1",sep="-"))
x = stConstruct(prec_data, c("X", "Y"), "YearDate")
class(x) # STIDF
x = as(x, "STSDF") # will sort out common locations & times

Bests,
On 07/01/2011 02:34 PM, Tom Gottfried wrote:

  
    
#
Edzer, I will try also your suggestion. Thank you.

Best wishes,

-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma
Sent: Friday, July 01, 2011 4:27 PM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] space-time kriging

Pinar / Tom,

another route you might follow is (improvised):

require(spacetime)
prec_data$YearDate = as.Date(paste(prec_data$Year, "1", "1",sep="-"))
x = stConstruct(prec_data, c("X", "Y"), "YearDate")
class(x) # STIDF
x = as(x, "STSDF") # will sort out common locations & times

Bests,
On 07/01/2011 02:34 PM, Tom Gottfried wrote: