getParticipant: Gets information about a single participant.

View source: R/getParticipant.R

getParticipantR Documentation

Gets information about a single participant.

Description

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

Usage

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

See Also

getParticipantAttributes saveParticipant deleteParticipant

Examples

## Not run: 
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"

## 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))

## End(Not run)


nzilbb.labbcat documentation built on July 26, 2023, 6:08 p.m.