methods.escalc | R Documentation |
Methods for objects of class "escalc"
.
## 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)
x |
an object of class |
... |
other arguments. |
For the `[`
method, any variables specified as part of the i
argument will be searched for within object x
first (see ‘Examples’).
Wolfgang Viechtbauer (wvb@metafor-project.org, https://www.metafor-project.org).
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
### 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.