| Type: | Package |
| Title: | Accessing the 'CHILDES' Database |
| Description: | Tools for connecting to 'CHILDES', an open repository for transcripts of parent-child interaction. For more information on the underlying data, see https://langcog.github.io/childes-db-website/. |
| Version: | 0.3.0 |
| Depends: | R (≥ 4.4) |
| License: | GPL-3 |
| URL: | https://github.com/langcog/childesr, https://langcog.github.io/childesr/ |
| BugReports: | https://github.com/langcog/childesr/issues |
| Encoding: | UTF-8 |
| Imports: | dplyr (≥ 1.2), jsonlite (≥ 2.0), magrittr (≥ 2.0), purrr (≥ 1.0), rlang (≥ 1.1) |
| Suggests: | redivis (≥ 0.11.0), knitr, rmarkdown, curl, testthat (≥ 3.0.0) |
| Additional_repositories: | https://langcog.r-universe.dev |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.3.3 |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2026-09-16 00:12:19 UTC; mcfrank |
| Author: | Michael C. Frank [aut, cre, cph], Mika Braginsky [aut], Alessandro Sanchez [aut, ctb], Daniel Yurovsky [aut], Kyle MacDonald [ctb], Stephan Meylan [ctb], Jessica Mankewitz [ctb] |
| Maintainer: | Michael C. Frank <mcfrank@stanford.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-16 07:10:02 UTC |
childesr: Accessing the 'CHILDES' Database
Description
Tools for connecting to 'CHILDES', an open repository for transcripts of parent-child interaction. For more information on the underlying data, see https://langcog.github.io/childes-db-website/.
Author(s)
Maintainer: Michael C. Frank mcfrank@stanford.edu [copyright holder]
Authors:
Mika Braginsky mika.br@gmail.com
Alessandro Sanchez amsan7@gmail.com [contributor]
Daniel Yurovsky dyurovsky@gmail.com
Other contributors:
Kyle MacDonald kylem412@gmail.com [contributor]
Stephan Meylan meylan.stephan@gmail.com [contributor]
Jessica Mankewitz jmankewitz@gmail.com [contributor]
See Also
Useful links:
Report bugs at https://github.com/langcog/childesr/issues
Clear all connections
Description
As of childesr 0.3, data are retrieved from the versioned childes-db dataset on Redivis rather than a MySQL database, so there are no connections to clear. This function only clears the session's table cache.
Usage
clear_connections()
Connect to CHILDES
Description
As of childesr 0.3, data are retrieved from the versioned childes-db dataset on Redivis rather than a MySQL database, so no connection object is needed. 'connect_to_childes()' is deprecated: it warns and returns 'NULL', which can still be passed as the 'connection' argument of the 'get_' functions (where it is ignored).
Usage
connect_to_childes(db_version = "current", db_args = NULL)
Arguments
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Examples
## Not run:
con <- connect_to_childes(db_version = "current")
## End(Not run)
Get collections
Description
Get collections
Usage
get_collections(connection = NULL, db_version = "current", db_args = NULL)
Arguments
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Collection data
Examples
## Not run:
get_collections()
## End(Not run)
Get content
Description
Internal engine for the content getters ('get_tokens', 'get_types', 'get_utterances'). Filters are translated into a BigQuery Standard SQL query that runs server-side on Redivis, so that only the matching rows of the (very large) content tables are transferred. String comparisons are case-insensitive, mirroring the collation of the retired MySQL server.
Usage
get_content(
content_type,
collection = NULL,
language = NULL,
corpus = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
target_child = NULL,
token = NULL,
stem = NULL,
part_of_speech = NULL,
tag
)
Arguments
content_type |
One of "token", "utterance" or "token_frequency" |
collection |
A character vector of one or more names of collections |
language |
A character vector of one or more languages |
corpus |
A character vector of one or more names of corpora |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
target_child |
A character vector of one or more names of children |
token |
A character vector of one or more token patterns ('%' matches any number of wildcard characters, '_' matches exactly one wildcard character) |
stem |
A character vector of one or more stems |
part_of_speech |
A character vector of one or more parts of speech |
tag |
Redivis dataset version tag (e.g. "v1.3") |
Get the utterances surrounding a token(s)
Description
Get the utterances surrounding a token(s)
Usage
get_contexts(
collection = NULL,
language = NULL,
corpus = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
target_child = NULL,
token,
window = c(0, 0),
remove_duplicates = TRUE,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
language |
A character vector of one or more languages |
corpus |
A character vector of one or more names of corpora |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
target_child |
A character vector of one or more names of children |
token |
A character vector of one or more token patterns ('%' matches any number of wildcard characters, '_' matches exactly one wildcard character) |
window |
A length 2 numeric vector of how many utterances before and after each utterance containing the target token to retrieve |
remove_duplicates |
A boolean indicating whether to remove duplicate utterances from the results |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Utterance data, filtered down by supplied arguments.
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_contexts(target_child = "Shem", token = "dog")
## End(Not run)
Get corpora
Description
Get corpora
Usage
get_corpora(connection = NULL, db_version = "current", db_args = NULL)
Arguments
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Corpus data
Examples
## Not run:
get_corpora()
## End(Not run)
Get information on database connection options
Description
Retrieves hosted information about available versions of childes-db and their corresponding versions of the childes-db dataset on Redivis. If the hosted information cannot be retrieved or does not specify the Redivis version mapping, a mapping built into the package is used instead.
Usage
get_db_info()
Value
List of database info, including 'redivis_current' (the childes-db version that is the current Redivis release) and 'redivis_versions' (a named vector mapping childes-db versions to Redivis dataset versions).
Examples
## Not run:
get_db_info()
## End(Not run)
Get participants
Description
Get participants
Usage
get_participants(
collection = NULL,
corpus = NULL,
target_child = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
corpus |
A character vector of one or more names of corpora |
target_child |
A character vector of one or more names of children |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Participant data, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_participants()
## End(Not run)
Get speaker statistics
Description
Get speaker statistics
Usage
get_speaker_statistics(
collection = NULL,
corpus = NULL,
target_child = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
corpus |
A character vector of one or more names of corpora |
target_child |
A character vector of one or more names of children |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Speaker statistics, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_speaker_statistics()
## End(Not run)
Run a SQL Query script on the CHILDES database
Description
As of childesr 0.3, queries run against the childes-db dataset on Redivis, whose query engine uses BigQuery Standard SQL rather than MySQL SQL. Standard SQL queries against the childes-db tables ('collection', 'corpus', 'transcript', 'participant', 'transcript_by_speaker', 'utterance', 'token', 'token_frequency') work unchanged; queries using MySQL-specific syntax may need to be updated (see https://cloud.google.com/bigquery/docs/reference/standard-sql/).
Usage
get_sql_query(
sql_query_string,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
sql_query_string |
A valid BigQuery Standard SQL query string |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
The result of running the supplied SQL query on the childes-db dataset
Examples
## Not run:
get_sql_query("SELECT * FROM collection")
## End(Not run)
Get tokens
Description
Get tokens
Usage
get_tokens(
collection = NULL,
language = NULL,
corpus = NULL,
target_child = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
token,
stem = NULL,
part_of_speech = NULL,
replace = TRUE,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
language |
A character vector of one or more languages |
corpus |
A character vector of one or more names of corpora |
target_child |
A character vector of one or more names of children |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
token |
A character vector of one or more token patterns ('%' matches any number of wildcard characters, '_' matches exactly one wildcard character) |
stem |
A character vector of one or more stems |
part_of_speech |
A character vector of one or more parts of speech |
replace |
A boolean indicating whether to replace "gloss" with
"replacement" (i.e. phonologically assimilated form), when available
(defaults to |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Token data, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_tokens(token = "dog")
## End(Not run)
Get transcripts
Description
Get transcripts
Usage
get_transcripts(
collection = NULL,
corpus = NULL,
target_child = NULL,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
corpus |
A character vector of one or more names of corpora |
target_child |
A character vector of one or more names of children |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Transcript data, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_transcripts()
## End(Not run)
Get types
Description
Get types
Usage
get_types(
collection = NULL,
language = NULL,
corpus = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
target_child = NULL,
type = NULL,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
language |
A character vector of one or more languages |
corpus |
A character vector of one or more names of corpora |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
target_child |
A character vector of one or more names of children |
type |
A character vector of one or more type patterns (' number of wildcard characters, '_' matches exactly one wildcard character) |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Type data, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_types()
## End(Not run)
Get utterances
Description
Get utterances
Usage
get_utterances(
collection = NULL,
language = NULL,
corpus = NULL,
role = NULL,
role_exclude = NULL,
age = NULL,
sex = NULL,
target_child = NULL,
connection = NULL,
db_version = "current",
db_args = NULL
)
Arguments
collection |
A character vector of one or more names of collections |
language |
A character vector of one or more languages |
corpus |
A character vector of one or more names of corpora |
role |
A character vector of one or more roles to include |
role_exclude |
A character vector of one or more roles to exclude |
age |
A numeric vector of an single age value or a min age value and max age value (inclusive) in months. For a single age value, participants are returned for which that age is within their age range; for two ages, participants are returned for whose age overlaps with the interval between those two ages. |
sex |
A character vector of values "male" and/or "female" |
target_child |
A character vector of one or more names of children |
connection |
Deprecated, ignored (childesr now reads from the childes-db dataset on Redivis) |
db_version |
String of the name of database version to use |
db_args |
Deprecated, ignored |
Value
A 'tbl' of Utterance data, filtered down by supplied arguments
Identifiers
Numeric ids in childes-db ('transcript_id', 'utterance_id', token 'id', and so on) are internal to a database release: they are not stable across versions of childes-db and should never be used to link data across releases. The TalkBank persistent identifier (the 'pid' column returned by 'get_transcripts()') is the stable, externally-facing identifier for a transcript; use it to match transcripts across database versions or with other TalkBank tools. For reproducible analyses, pin the database version with the 'db_version' argument.
Examples
## Not run:
get_utterances(target_child = "Shem")
## End(Not run)