rcosmo (version 1.1.2)

ancestor: Return index of \(k\)th ancestor pixel

Description

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

Usage

ancestor(p, k)

Arguments

p

A pixel index specified in nested order.

k

A generation of an ancestor pixel.

Examples

Run this code
# NOT RUN {
 ancestor(4,2)
 ancestor(17,2)

# }

Run the code above in your browser using DataCamp Workspace