
Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'im':
split(x, f, ..., drop = FALSE)
"im"
)."tess"
) or a pixel image with factor values.drop=FALSE
) or
as a one-dimensional vector of pixel values (drop=TRUE
).drop=FALSE
, a list of pixel images (objects of class
"im"
). It is also of class "listof"
so that it can be
plotted immediately. If drop=TRUE
, a list of numeric vectors.
split
for the class of pixel images. The image x
will be divided
into subsets determined by the data f
. The result is a list
of these subsets.The splitting criterion may be either
"tess"
). Each tile of
the tessellation delineates a subset of the spatial domain."im"
) with factor
values. The levels of the factor determine subsets of the spatial
domain.drop=FALSE
(the default), the result is a list of pixel
images, each one a subset of the pixel image x
,
obtained by restricting the pixel domain to one of the subsets.
If drop=TRUE
, then the pixel values are returned as
numeric vectors.by.im
,
tess
,
im
W <- square(1)
X <- as.im(function(x,y){sqrt(x^2+y^2)}, W)
Y <- dirichlet(runifpoint(12, W))
plot(split(X,Y))
Run the code above in your browser using DataLab