createRtopObject: Create an object for interpolation within the rtop package

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rtop.R

Description

This is a help function for creating an object (see rtop-package to be used for interpolation within the rtop package

Usage

1
2
3
createRtopObject(observations, predictionLocations,
   formulaString, params=list(), ainfo, areas, overlapObs,
   overlapPredObs, ...)

Arguments

observations

SpatialPolygonsDataFrame with observations

predictionLocations

a SpatialPolygons or a SpatialPolygonsDataFrame-object with prediction locations

formulaString

formula that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name z, for ordinary and simple kriging use the formula z~1; for universal kriging, suppose z is linearly dependent on x and y, use the formula z~x+y. The formulaString defaults to "value~1" if value is a part of the data set. If not, the first column of the data set is used. Universal kriging is not yet properly implemented in the rtop-package, this element is mainly used for defining the dependent variable.

params

parameters to modify the standard parameters of the rtop-package, set internally in this function by a call to getRtopParams

ainfo

SpatialPointsDataFrame with information about the observations. Only used here if it contains information for separating the observations into observations and predictionLocations or combining ainfo with areas to find observations and predictionLocations(depreceted method). Typically from a call to readAreaInfo

areas

SpatialPolygonsDataFrame with areal information, typically from a call to readAreas, depreceted

overlapObs

matrix with observations that overlap each other

overlapPredObs

matrix with observations and predictionLocations that overlap each other

...

Extra parameters to getRtopParams and possibility to pass depreceted arguments

Value

An object of class rtop with observations, prediction locations, parameters and possible other elements useful for interpolation in the rtop-package. Most other externally visible functions in the package will be able to work with this object, and add the results as a new element.

Author(s)

Jon Olav Skoien

See Also

rtop-package and getRtopParams

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 ## Not run: 
library(rgdal)
rpath = system.file("extdata",package="rtop")
observations = readOGR(rpath,"observations")
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
predictionLocations = readOGR(rpath,"predictionLocations")

# Setting some parameters 
params = list(gDist = TRUE, cloud = FALSE)
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
# Build an object
rtopObj = createRtopObject(observations, predictionLocations, 
                           params = params)

## End(Not run)

rtop documentation built on May 2, 2019, 6:48 p.m.