Description Usage Arguments Value Examples
Assign value(s) to a new or existing MDlist variable
1 |
meta.obj |
An MDlist (an object from
|
var |
A length one character vector of the variable name to assign to. |
values |
A vector of value(s) to assign to var. |
NA2NULL |
logical. If TRUE converts missing (NA) to NULL. |
Returns a MDlist object with the newly assigned values.
1 2 3 4 5 6 7 8 9 | path <- system.file("extdata/bibTest.bib", package = "metaDAT")
dat <- read.MD(path)
MDassign(dat, "new", rnorm(3))
MDassign(dat, "nt", rnorm(3))
MDassign(dat, "new", list(1, 2, 3))
MDassign(dat, "new", list(1, 2, NULL))
MDassign(dat, "new", c(1, 2, NA))
MDassign(dat, "new", c(1, 2, NA), NA2NULL = FALSE)
MDassign(dat, "new", list(NA, mtcars[, 1], mtcars))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.