pix.HPDataFrame: HEALPix pixel indices from 'HPDataFrame'

Description Usage Arguments Value Examples

View source: R/HPDataFrame.R

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

1
2
## S3 method for class 'HPDataFrame'
pix(x, new.pix, ...)

Arguments

x

a HPDataFrame.

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

1
2
df <- HPDataFrame(I = rep(0,12), nside = 1)
pix(df)

rcosmo documentation built on Feb. 14, 2020, 5:06 p.m.