result.extract.sub {phenmod} | R Documentation |
Extract values
Description
Extracts and transformates given values to a data.frame with same order as a given masking grid.
Usage
result.extract.sub(mask.grid, values, gk4.x, gk4.y,
outliers, silent=FALSE, withOutliers=FALSE)
Arguments
mask.grid |
A grid containing spatial information related to the values and their Gauss-Krueger-Coordinates. The values in the resulting data.frame will be ordered related to values in ‘mask.grid’. |
values |
The values that should be extracted and transformed. |
gk4.x |
Gauss-Krueger-Rechtswert related to values. |
gk4.y |
Gauss-Krueger-Hochwert related to values. |
outliers |
Outlier information related to values. |
silent |
A boolean value determining wether the function should generate output messages or not. |
withOutliers |
A boolean value determining wether outliers should be included in extraction and transformation or not. |
Details
Extracts and transformates given values (with related Gauss-Krueger-Coordinates) to a data.frame with same order as a given masking grid.
Value
A grid containing the values and their coordinates (as given in ‘mask.grid’).
Author(s)
Daniel Doktor, Maximilian Lange
See Also
Examples
## load preprocessed data
data(dataFinal)
## load spatial information
data(relatedGrid)
## set or load params
params <- c(0, 0.058326, 0.109494, 0.039178,
-10.34, -0.89, 18.11,-10.03,
28.61, 44.49)
## apply model
result <- pim.solve(params, dataFinal, model.no=11,
silent=FALSE, out2File=FALSE)
## resolve outlier information
outliers <- result$outlier.bb + result$outlier.lc
outliers.na <- which(is.na(outliers)==TRUE)
outliers[outliers.na] <- rep(0, length(outliers.na))
mask.grid <- relatedGrid
## extract valid modelled values
values.model <- result.extract.sub(mask.grid=mask.grid,
result$doy.bb.pim, result$gk4.x,
result$gk4.y, outliers=outliers,
silent=FALSE, withOutliers=FALSE)$values