renameParticipants: Renames a list of participants

View source: R/renameParticipants.R

renameParticipantsR Documentation

Renames a list of participants

Description

This function changes the IDs of a given set of participants, where possible.

Usage

renameParticipants(labbcat.url, current.ids, new.ids, no.progress = FALSE)

Arguments

labbcat.url

URL to the LaBB-CAT instance

current.ids

A vector of participant IDs that as they are currently defined in the corpus.

new.ids

A vector of new participant IDs, each element corresponding to an ID in current.ids.

no.progress

TRUE to suppress visual progress bar. Otherwise, progress bar will be shown when interactive().

Value

A vector of results, each element corresponding to an ID in current.ids. If the ID was successfully changed, the corresponding element is TRUE. If the ID could not be changed (e.g. because there is already an existing participant using the new ID), then the corresponding element is FALSE.

See Also

  • getParticipantIds

  • getMatchingParticipantIds

  • getParticipant

  • saveParticipant

  • deleteParticipant

Examples

## Not run: 
## Create some new participant records
old.ids <- c("test-id-1","test-id-2","test-id-3")
for (id in old.ids) saveParticipant(labbcat.url, id)

## Batch change the IDs
new.ids <- c("test-id-1-changed","test-id-2-changed","test-id-3-changed")
renameParticipants(labbcat.url, old.ids, new.ids)

## Delete the participants we just created
for (id in new.ids) deleteParticipant(labbcat.url, id)

## End(Not run)


nzilbb.labbcat documentation built on June 8, 2025, 10:57 a.m.