keyATM_read: Read Texts

Description Usage Arguments Value Examples

View source: R/model.R

Description

This function read texts and creates a tibble.

Usage

1
keyATM_read(texts, encoding = "UTF-8", check = TRUE)

Arguments

texts

Input. keyATM takes dfm, data.frame, tibble, and a vector of file paths.

Value

A list whose elements are splitted texts.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
 # Use quanteda dfm 
 keyATM_docs <- keyATM_read(quanteda_dfm) 
  
 # Use data.frame or tibble (texts should be stored in a column named `text`)
 keyATM_docs <- keyATM_read(data_frame_object) 
 keyATM_docs <- keyATM_read(tibble_object) 

 # Use a vector that stores full paths to the files  
 files <- list.files(doc_folder, pattern = "*.txt", full.names = T) 
 keyATM_docs <- keyATM_read(files) 

## End(Not run)

Shusei-E/keyATM-OLD documentation built on Dec. 23, 2019, 6:42 p.m.