Description Usage Arguments Note Author(s) Examples
Like the get_
functions with the same name, these functions provide a
familiar interface to set the hidden fields of a Survey
object.
1 2 3 4 5 6 7 8 9 | set_label(.srv, ..., .list = NULL, .auto = FALSE)
set_association(.srv, ..., .list = NULL, .common = FALSE)
set_marketshare(.srv, ..., .list = NULL)
set_config(.srv, ..., .list = NULL)
set_translation(.srv, ..., .list = NULL, .language = NULL)
|
.srv |
A |
... |
Named arguments of the format |
.list |
Optional: A |
.auto |
Optional: Set to |
.common |
Optional: Set to |
.language |
Optional: Language defaults to use for translations. |
These functions return a copy (deep_clone
) of the Survey
.
Use the R6
method directly to avoid copying.
Kristian D. Olsen
1 2 3 4 5 6 7 8 9 10 11 12 | # Create a new survey (regular)
x <- survey_df(data.frame("A" = 1, "B" = 2))
x <- set_label(x, A = "This is a label")
get_label(x, "A")
# Same example using R6
y <- survey_df(data.frame("A" = 1, "B" = 2))
y$set_label(A = "This is a label")
y$get_label("A")
# Should be equivalent
all.equal(x, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.