R: Separate a Vector Measure into its Scalar Components

unstack.msr {spatstat.core} | R Documentation

## Separate a Vector Measure into its Scalar Components

### Description

Converts a vector-valued measure into a list of scalar-valued measures.

### Usage

    ## S3 method for class 'msr'
    unstack(x, ...)

### Arguments

`x` | A measure (object of class `"msr"`).
`...` | Ignored.

### Details

This is a method for the generic `unstack` for the class `"msr"` of measures.

If `x` is a vector-valued measure, then `y <- unstack(x)` is a list of scalar-valued measures defined by the components of `x`. The `j`th entry of the list, `y[[j]]`, is equivalent to the `j`th component of the vector measure `x`.

If `x` is a scalar-valued measure, then the result is a list consisting of one entry, which is `x`.

### Value

A list of measures, of class `"solist"`.

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

### See Also

`unstack`

`unstack.ppp`

`split.msr`.

### Examples

       fit <- ppm(cells ~ x)
       m <- residuals(fit, type="score")
       m
       unstack(m)

[Package spatstat.core version 2.4-4 Index]