Last data update: 2014.03.03

R: Construct Spatio - temporal regular data.
ConstructMPstR Documentation

Construct Spatio - temporal regular data.

Description

Create an spatio - temporal object with regular data to order employing median polish technique.

Usage

ConstructMPst(valuest,time,pts,Delta)

Arguments

valuest

it's a data.frame in which different columns refer to different locations, and each row reflects a particular observation time.

time

indicate the time of valuest, the intervals of time must be regular.

pts

it's a data.frame that hold three dimensions spatial coordinates x, y and z.

Delta

vector with number of divisions of each spatial direction. c(Delta x, Delta y, Delta z).

Details

Table composed for coordinates of center and average of position of stations for unit tridimensional array in space - time, in which show a average value of site.

Value

An object of class ConstructMPst with the following list of components:

results

average value of the set of stations into unity spatio - temporal defined for delta.

Value

array with the results organized in dimensions defined in Delta.

valuest

valuest

pts

pts

time

time

Delta

Delta

References

Berke, O. (2001). Modified median polish kriging and its application to the wolfcamp - aquifer data. Environmetrics, 12(8):731-748.[link]

Examples

## Not run:
data(Metadb)
x<-matrix(0,1,37)
for(i in 1:37){
 x[,i] <- 2007 + (seq(0, 36)/12)[i]
}
x<-as.Date (as.yearmon(x), frac = 1)
time = as.POSIXct(x, tz = "GMT")

MPST<-ConstructMPst(Metadb[,-c(1:4)],time,pts=Metadb[,2:4],Delta=c(7,6,5))
## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(STMedianPolish)
Loading required package: maptools
Loading required package: sp
Checking rgeos availability: TRUE
Loading required package: reshape2
Loading required package: spacetime
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/STMedianPolish/ConstructMPst.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ConstructMPst
> ### Title: Construct Spatio - temporal regular data.
> ### Aliases: ConstructMPst
> 
> ### ** Examples
> 
> ## Not run:
> data(Metadb)
> x<-matrix(0,1,37)
> for(i in 1:37){
+  x[,i] <- 2007 + (seq(0, 36)/12)[i]
+ }
> x<-as.Date (as.yearmon(x), frac = 1)
> time = as.POSIXct(x, tz = "GMT")
> 
> MPST<-ConstructMPst(Metadb[,-c(1:4)],time,pts=Metadb[,2:4],Delta=c(7,6,5))
   |                                                                               |                                                                      |   0%   |                                                                               |==                                                                    |   3%   |                                                                               |====                                                                  |   5%   |                                                                               |======                                                                |   8%   |                                                                               |========                                                              |  11%   |                                                                               |=========                                                             |  14%   |                                                                               |===========                                                           |  16%   |                                                                               |=============                                                         |  19%   |                                                                               |===============                                                       |  22%   |                                                                               |=================                                                     |  24%   |                                                                               |===================                                                   |  27%   |                                                                               |=====================                                                 |  30%   |                                                                               |=======================                                               |  32%   |                                                                               |=========================                                             |  35%   |                                                                               |==========================                                            |  38%   |                                                                               |============================                                          |  41%   |                                                                               |==============================                                        |  43%   |                                                                               |================================                                      |  46%   |                                                                               |==================================                                    |  49%   |                                                                               |====================================                                  |  51%   |                                                                               |======================================                                |  54%   |                                                                               |========================================                              |  57%   |                                                                               |==========================================                            |  59%   |                                                                               |============================================                          |  62%   |                                                                               |=============================================                         |  65%   |                                                                               |===============================================                       |  68%   |                                                                               |=================================================                     |  70%   |                                                                               |===================================================                   |  73%   |                                                                               |=====================================================                 |  76%   |                                                                               |=======================================================               |  78%   |                                                                               |=========================================================             |  81%   |                                                                               |===========================================================           |  84%   |                                                                               |=============================================================         |  86%   |                                                                               |==============================================================        |  89%   |                                                                               |================================================================      |  92%   |                                                                               |==================================================================    |  95%   |                                                                               |====================================================================  |  97%   |                                                                               |======================================================================| 100%
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>