Description Usage Arguments Value Examples
A convienence wrapper for MDget
and optionally
MDassign
. For more complicated needs (i.e. working
with more than one variable or pieces of a variable) use
MDget
to retrieve variable(s) and then lapply with
select functions. Finally, reassign with MDassign
.
1 |
meta.obj |
An MDlist (an object from
|
var |
A length one character vector of the variable name to grab. |
FUN |
A function that takes a single argument. |
newvar |
A length one character vector of the variable name to assign to. |
Returns a metaDAT list object with the newly assigned values.
1 2 3 4 5 6 | path <- system.file("extdata/bibTest.bib", package = "metaDAT")
dat <- read.MD(path)
dat <- MDapply(dat, "correlation_triangle", MDlist2matrix, "cor_mats")
MDapply(dat, "correlation_triangle", MDlist2matrix)
mean2 <- function(x) mean(unlist(x), na.rm = TRUE)
MDapply(dat, "cor_mats", mean2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.