# split.ppp

0th

Percentile

##### Divide Point Pattern into Sub-patterns

Divides a point pattern into several sub-patterns, according to their marks, or according to any user-specified grouping.

Keywords
spatial
split.ppp(x, f = x$marks) split(x, f) <- value ##### Arguments x A two-dimensional point pattern. An object of class "ppp". f Factor determining the grouping. value List of point patterns. ##### Details The function split.ppp divides up the points of the point pattern x into several sub-patterns according to the levels of the factor f. The result is a list of point patterns, one for each level of f. If f is present, it must be a factor, and its length must equal the number of points in x. The levels of f determine the destination of each point in x. The ith point of x will be placed in the sub-pattern split.ppp(x)$l where l = f[i].

If f is missing, then x must be a multitype point pattern (a marked point pattern whose marks vector is a factor). Then the effect is that the points of each type are separated into different point patterns.

The result of split.ppp has class "splitppp" and can be plotted using plot.splitppp.

The assignment function split<-.ppp updates the point pattern x so that it satisfies split(x, f) = value. The argument value is expected to be a list of point patterns, one for each level of f. These point patterns are expected to be compatible in the sense that they all have the same window, and either they are all unmarked or they all have marks of the same kind.

Splitting can also be undone by the function superimpose.

##### Value

• The value of split.ppp is a list of point patterns. The components of the list are named by the levels of f.

The assignment form split<-.ppp returns the updated point pattern x.

split.ppp(x, f = x$marks) ##### See Also cut.ppp, plot.splitppp, superimpose, ppp.object ##### Aliases • split.ppp • split<-.ppp • split • split<- ##### Examples # Multitype point pattern: separate into types data(amacrine) u <- split(amacrine) # the following are equivalent: amon <- amacrine[amacrine$marks == "on"]
amon <- split(amacrine)$on # plot them plot(split(amacrine)) # Scramble the locations of the 'on' cells u <- unmark(split(amacrine)) u$on <- runifpoint(amon$n, amon$window)
split(amacrine) <- u

# Point pattern with continuous marks
data(longleaf)
<testonly># smaller dataset
longleaf <- longleaf[seq(1, longleaf\$n, by=80)]</testonly>
# cut the range of tree diameters into three intervals
long3 <- cut.ppp(longleaf, 3)
# now split them
long3split <- split(long3)

# Unmarked point pattern
data(swedishpines)
# cut & split according to nearest neighbour distance
f <- cut(nndist(swedishpines), 3)
u <- split(swedishpines, f)
Documentation reproduced from package spatstat, version 1.6-11, License: GPL version 2 or newer

### Community examples

Looks like there are no examples yet.
{"ft_lang_label":"__label__en","ft_lang_prob":0.754493,"math_prob":0.9750886,"size":2584,"snap":"2020-10-2020-16","text_gpt3_token_len":703,"char_repetition_ratio":0.1631783,"word_repetition_ratio":0.04195804,"special_character_ratio":0.24226007,"punctuation_ratio":0.10408163,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.969832,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-17T03:11:12Z\",\"WARC-Record-ID\":\"<urn:uuid:8fe71074-e4b7-4a6d-baff-e094507a3fb3>\",\"Content-Length\":\"17509\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5fc6360c-5c65-4bab-a6f3-4c6a0fc39df0>\",\"WARC-Concurrent-To\":\"<urn:uuid:8390db29-5fe2-487c-8168-d721e66d9e3a>\",\"WARC-IP-Address\":\"54.80.66.241\",\"WARC-Target-URI\":\"https://www.rdocumentation.org/packages/spatstat/versions/1.6-11/topics/split.ppp\",\"WARC-Payload-Digest\":\"sha1:C67HRG4LT3GE6G4WIWRAPHMY7LCO2SYL\",\"WARC-Block-Digest\":\"sha1:UFQZ6HMIFSA3GLNRRPK33TXEC5FTBGHN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875141653.66_warc_CC-MAIN-20200217030027-20200217060027-00219.warc.gz\"}"}