corpusPrep: Check and prepare a corpus for use with functions in this...

Description Usage Arguments Value Examples

Description

For best use with this function it is best that data frames have values for the following columns:

Title

Character vector containing the title of each document

Author

Character vector containing the name of the associated author

Date

Vector of publication dates in either the "Date","POSIXct", or "POSIXt" format

Dates should be one of the following forms:

yyyymmdd hh:mm:ss ex.("20170806 00:00:00")

yyyy-mm-dd ex.("2017-08-06")

yyyymmdd ex.("20170806")

mm-dd-yyyy ex.("08-06-2017")

dd-mm-yyyy ex.("06-08-2017")

ddmmyyyy ex.("06082017")

URL

Character vector of associated url links

source

Character vector of associated publication sources

ArticleNo

Numeric vector of associated identification numbers of each document

Text

Character vector containing the body of the text to be analyzed

Usage

1
corpusPrep(data.td)

Arguments

data.td

A tidy dataset

Value

Returns the corpus with correct column names and classes for further analysis

Examples

1
clean_data<-corpusPrep(mayAritcles) 

JSmith146/CoRpEx documentation built on May 17, 2019, 10:11 p.m.