Learn R Programming

rcosmo (version 1.1.6)

pix.HPDataFrame: HEALPix pixel indices from HPDataFrame

Description

If new.pix is unspecified then this function returns the vector of HEALPix pixel indices from a HPDataFrame. If new.pix is specified then this function returns a new HPDataFrame with the same number of rows as x, but with pix attribute new.pix. Thus, new.pix must have length equal to nrow(x).

Usage

# S3 method for HPDataFrame
pix(x, new.pix, ...)

Value

The vector of HEALPix pixel indices (integers) or, if new.pix is specified, a new HPDataFrame.

Arguments

x

a HPDataFrame.

new.pix

optional vector of pixel indices with length equal to nrow(x)

...

Unused arguments.

Examples

Run this code
df <- HPDataFrame(I = rep(0,12), nside = 1)
pix(df)

Run the code above in your browser using DataLab