The function takes a tibble
(or any object that is internally represented
as a (named) list
by R
) of participant(s) data and adds them to the
LimeSurvey participant database of the selected survey.
Value
Called for a side effect, but returns the inserted data including additional new information like the token string.
Details
Generally, your part_data
object have to contain three variables:
firstname
, lastname
, and email
. That is something like a bare minimum,
but you may add any attribute recognized by LimeSurvey – even custom
attributes like attribute_1
or so. For the human-readable list of custom
attributes being held in the LimeSurvey participant database of the selected
survey, use ls_get_attrs()
. However, do not use the "semantic" form, as
ls_add_participants()
recognizes only raw, i.e. attribute_1
notation.
See also
Other LimeSurvey functions:
ls_call()
,
ls_export()
,
ls_get_attrs()
,
ls_invite()
,
ls_login()
,
ls_participants()
,
ls_responses()
,
ls_set_participant_properties()
,
ls_surveys()
Examples
if (FALSE) { # \dontrun{
# create participant table
part_data <- tibble(
firstname = "John",
lastname = "Doe",
email = "john@example.com",
language = "cs",
attribute_1 = "Example School"
)
# insert participant into the LimeSurvey database
ls_add_participants(123456, part_data)
# check if OK
ls_participants(123456)
} # }