Returns a nested named list with the participant information, including the given participant attributes.

getParticipant(labbcat.url, id, layer.ids)

Arguments

labbcat.url

URL to the LaBB-CAT instance

id

A participant ID

layer.ids

A vector of layer IDs corresponding to participant attributes, eg. c('participant_gender', 'participant_year_of_birth')

Value

A named list of representing the participant and its attributes, with members:

  • id The participant's unique internal database ID

  • label The ID (name) of the participant

  • annotations A named list of participant attributes e.g. the label of the participant's 'gender' attribute would be: participant$annotations$participant_gender$label

Examples

if (FALSE) {
## Get the gender and year of birth of AP511_MikeThorpe
participant <- getParticipant(labbcat.url, "AP511_MikeThorpe",
                  c("participant_gender", "participant_year_of_birth"))

print(paste("ID:", participant$label,
            "Gender:", participant$annotations$participant_gender$label,
            "YOB:", participant$annotations$participant_year_of_birth$label))
}