
Last chance! 50% off unlimited learning
Sale ends in
ProcessData(d, type = "p", lim = NULL, ply = NULL,
grid.res = list(x = NA, y = NA),
grid.mba = list(n = NA, m = NA, h = 11))
x
and y
, and optional variables
z
, t
, vx
, vy
, and vz
.d
.type="p"
a polygon that defines either the
data limits, else if type="g"
a crop region for gridded data.SetPreferences
.SetPreferences
.type="p"
returns a data frame with variables:x
and y
coordinates.x
,
y
and z
directions, respectively (optional).type="g"
returns a list with components:z
are measured.x
and y
directions,
respectively.x
and y
directions (optional).d
data table with NA
values for
either x
, y
, or t
is removed.
The spatial and temporal domains are constrained using data limits for
x
, y
, z
, and t
. Additionally, the spatial domain
may be limited using a polygon defined in the xy-plane.
Interpolated grid values corresponding to grid nodes located outside
the polygon boundary are set to NA
.point.in.polygon
, CutoutPolygon
,
mba.points
x <- c(7.8, 5, 2.2, 3.7, NA, -1.6, -7.5)
y <- c(-2.3, -4.7, -2.2, -2.3, -3.4, -1.6, -7.5)
z <- c(-0.9, -1.2, -2.4, -2.4, -0.4, 0.1, 2)
t <- c("4/23/2009 10:43", "4/24/2009 11:20", "4/24/2009 12:08",
"4/24/2009 12:50", "4/24/2009 13:51", "4/24/2009 14:24",
"4/24/2009 14:44")
t <- as.POSIXct(t, format = "%m/%d/%Y %H:%M")
data.raw <- as.data.frame(list(x = x, y = y, z = z, t = t))
data.pts <- ProcessData(data.raw, type = "p")
data.grd <- ProcessData(data.pts, type = "g")
lim <- list(x = c(NA, 5), t = c(as.POSIXct("4/24/2009 12",
format = "%m/%d/%Y %H"), NA))
data.pts <- ProcessData(data.raw, type = "p", lim = lim)
ply <- as(cbind(c(-4, 2, -6), c(-7, -3, -3)), "gpc.poly")
grid.res <- list(x = 0.2, y = 0.5)
data.grd <- ProcessData(data.pts, type = "g", ply = ply,
grid.res = grid.res)
Run the code above in your browser using DataLab