set_mw<- | R Documentation |
set_mw
is used to assign values (write to) slots of
Multiwave
class objects. It is used to set values of
multiwave (mw) objects.
set_mw(
x,
phase = 1,
wave = NA,
slot = c("data", "design", "metadata", "samples", "sampled_data")
) <- value
x |
an object of class |
phase |
a numeric value specifying the phase that should be accessed.
To access the overall metadata, set |
wave |
a numeric value specifying the wave that should be accessed.
Ta access phase metadata, set |
slot |
a character value specifying the name of the slot to be
accessed. Must be one of |
value |
value to assign to specified slot |
# Intiate multiwave object
MySurvey <- multiwave(phases = 2, waves = c(1, 3))
# To write overall metadata
set_mw(MySurvey, phase = NA, slot = "metadata") <-
list(title = "Maternal Weight Survey")
# To write Phase 2 metadata
set_mw(MySurvey, phase = 2, slot = "metadata") <-
list(strata = "mystrata", id = "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.