saveParticipant.Rd
This function allows the participant attributes and the ID of a given participant to be updated.
saveParticipant(labbcat.url, id, label = id, attributes = NULL)
URL to the LaBB-CAT instance
The participant ID - either the unique internal database ID, or their name.
The new ID (name) for the participant
A named list of participant attribute values - the names are the participant attribute layer IDs, and the values are the corresponding new attribute values. The pass phrase for participant access can also be set by specifying a "_password" attribute.
TRUE if the participant's record was updated, FALSE if there were no changes detected.
To change the ID of an existing participant, pass the old/current ID as the id
,
and pass the new ID as the label
.
If the participant ID does not already exist in the database, a new participant record is created.
if (FALSE) {
## Create a new participant record
saveParticipant(labbcat.url, "Juan Perez", attributes=list(participant_gender="M"))
## Change the name and the gender of the participant record
saveParticipant(labbcat.url, "Juan Perez", "Maria Perez", list(participant_gender="F"))
### Delete the participant we just created
deleteParticipant(labbcat.url, "Maria Perez")
}