rcosmo (version 1.1.2)

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, ...)

Arguments

new.pix

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

...

Unused arguments.

Value

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

Examples

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

# }

Run the code above in your browser using DataCamp Workspace