Learn R Programming

rcosmo (version 1.1.6)

parent: Return index of parent pixel

Description

Gives the pixel at resolution \(j - 1\) that contains \(p\), where \(p\) is specified at resolution \(j\) (notice it does not depend on \(j\)).

Usage

parent(p)

Value

A numeric vector of nested pixel indices at resolution \(j-1\), identifying the parent containing each input pixel.

Arguments

p

A pixel index specified in nested order.

Examples

Run this code

 parent(4)
 parent(5)

Run the code above in your browser using DataLab