rbind.CMBDataFrame: 'rbind' for CMBDataFrames

Description Usage Arguments See Also Examples

View source: R/CMBDataFrameGenerics.R

Description

Add a new row or rows to a CMBDataFrame. All arguments passed to ... must be CMBDataFrames. If the CMBDataFrame arguments have overlapping pixel indices then all but one of the non-unique rows will be deleted unless unsafe = TRUE. If unsafe = TRUE then a HPDataFrame will be returned instead of a CMBDataFrame.

Usage

1
2
## S3 method for class 'CMBDataFrame'
rbind(..., deparse.level = 1, unsafe = FALSE)

Arguments

...

A number of CMBDataFrames

deparse.level

See documentation for rbind.data.frame.

unsafe

A boolean. If the CMBDataFrame arguments have overlapping pixel indices then all but one of the non-unique rows will be deleted unless unsafe = TRUE. If unsafe = TRUE then a HPDataFrame will be returned instead of a CMBDataFrame.

See Also

See the documentation for rbind

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
df <- CMBDataFrame(nside = 1, I = 1:12)

df.123 <- CMBDataFrame(df, spix = c(1,2,3))
df.123
df.234 <- CMBDataFrame(df, spix = c(2,3,4))
df.234

df.1234 <- rbind(df.123, df.234)
df.1234
class(df.1234) # A CMBDataFrame
pix(df.1234)

df.123234 <- rbind(df.123, df.234, unsafe = TRUE)
df.123234
class(df.123234) # A HPDataFrame
pix(df.123234)

rcosmo documentation built on Dec. 11, 2021, 9:29 a.m.