View source: R/expressionFromAttributeValuesCount.R
expressionFromAttributeValuesCount | R Documentation |
This function generates a query expression fragment which can be passed as the transcript.expression or participant.expression parameter of getMatches, (or the expression parameter of getMatchingTranscriptIds or getMatchingParticipantIds) matching by the number of values for a given attribute.
expressionFromAttributeValuesCount(
transcript.attribute,
comparison = "==",
count
)
transcript.attribute |
The transcript attribute to filter by. |
comparison |
A string representing the operator to use for comparison, one of "<", "<=", "==", "!=", ">=", ">". |
count |
The number to compare the count of values to. |
The attribute defined by transcript.attribute is expected to have possibly more than one value, although single-value attributes may have 0 or 1 values, and this function can be used to distinguish these two possibilities as well.
A transcript query expression which can be passed as the transcript.expression parameter of getMatches or the expression parameter of getMatchingTranscriptIds
expressionFromAttributeValues
expressionFromTranscriptTypes
expressionFromIds
getMatches
## Not run:
## Search only transcripts including multilingual participants
results <- getMatches(labbcat.url, list(segment="I"),
participant.expression = expressionFromAttributeValuesCount(
"participant_languages", ">=", 2))
## Search only transcripts with no restrictions specified
results <- getMatches(labbcat.url, list(segment="I"),
transcript.expression = expressionFromAttributeValuesCount(
"transcript_restrictions", "==", 0))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.