methods.escalc: Methods for 'escalc' Objects

methods.escalcR Documentation

Methods for 'escalc' Objects

Description

Methods for objects of class "escalc".

Usage

## S3 method for class 'escalc'
x[i, ...]
## S3 replacement method for class 'escalc'
x$name <- value
## S3 method for class 'escalc'
cbind(..., deparse.level=1)
## S3 method for class 'escalc'
rbind(..., deparse.level=1)

Arguments

x

an object of class "escalc".

...

other arguments.

Note

For the `[` method, any variables specified as part of the i argument will be searched for within object x first (see ‘Examples’).

Author(s)

Wolfgang Viechtbauer (wvb@metafor-project.org, https://www.metafor-project.org).

References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. ⁠https://doi.org/10.18637/jss.v036.i03⁠

Examples

### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### select rows where variable 'alloc' is equal to 'random'
dat[dat$alloc == "random",]

### variables specified are automatically searched for within the object itself
dat[alloc == "random",]

### note: this behavior is specific to 'escalc' objects; this doesn't work for regular data frames

wviechtb/metafor documentation built on Dec. 4, 2024, 1:03 a.m.