word_counts {childeswordfreq} | R Documentation |
Get Word Counts by Speaker Role
Description
Reads a word list CSV and outputs a word frequency Excel file with summary.
Usage
word_counts(
word_list_file,
output_file,
collection = NULL,
language = NULL,
corpus = NULL,
age = NULL,
sex = NULL
)
Arguments
word_list_file |
Path to CSV file with a "word" column. |
output_file |
Path to output Excel (.xlsx) file. |
collection |
Language collection (default = NULL). |
language |
Vector of languages. |
corpus |
Vector of corpora. |
age |
Numeric vector: single value or min/max. |
sex |
"male" and/or "female". |
Value
Writes an Excel file with 2 sheets: word frequencies and summary.
Examples
word_file <- system.file("extdata", "word_list.csv", package = "childeswordfreq")
output_file <- tempfile(fileext = ".xlsx")
word_counts(
word_list_file = word_file,
output_file = output_file,
collection = NULL,
language = "eng",
age = c(18, 36),
sex = NULL
)
[Package childeswordfreq version 0.1.0 Index]