-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `freq_first_names` and `freq_last_names` were just a string of the data set name. This has been updated with the actual data set. NEW FEATURES * `available_data` added to see what data sets are available in **lexicon**.
- Loading branch information
Showing
17 changed files
with
224 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,18 @@ Authors@R: c(person("Tyler", "Rinker", email = | |
"[email protected]", role = c("aut", "cre"))) | ||
Maintainer: Tyler Rinker <[email protected]> | ||
Description: A collection of lexical hash tables, dictionaries, and | ||
word lists. | ||
Depends: | ||
R (>= 3.2.2) | ||
Imports: | ||
data.table, | ||
syuzhet (>= 1.0.1) | ||
Date: 2017-03-06 | ||
word lists. | ||
Depends: R (>= 3.2.2) | ||
Imports: data.table, syuzhet (>= 1.0.1) | ||
Date: 2017-04-09 | ||
License: MIT + file LICENSE | ||
LazyData: TRUE | ||
Roxygen: list(wrap = FALSE) | ||
RoxygenNote: 6.0.1 | ||
BugReports: https://github.com/trinker/lexicon/issues?state=open | ||
URL: https://github.com/trinker/lexicon | ||
Collate: | ||
Collate: | ||
'available_data.R' | ||
'common_names.R' | ||
'discourse_markers_alemany.R' | ||
'dodds_sentiment.R' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(available_data) | ||
export(hash_sentiment_jockers) | ||
export(key_sentiment_jockers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#' Get Available \pkg{lexicon} Data | ||
#' | ||
#' See available \pkg{lexicon} data a data.frame. | ||
#' | ||
#' @return Returns a data.frame | ||
#' @export | ||
#' @examples | ||
#' available_data() | ||
available_data <- function(){ | ||
|
||
|
||
results <- utils::data(package = 'lexicon')[["results"]] | ||
dat <- stats::setNames(data.frame(results[, 3:4, drop = FALSE], | ||
stringsAsFactors = FALSE), c("Data", "Description")) | ||
|
||
ns <- getNamespaceExports(loadNamespace('lexicon')) | ||
ns <- ns[!ns %in% c("available_data")] | ||
dat <- rbind.data.frame(dat, | ||
data.frame( | ||
Data = ns, | ||
Description = c('Jockers Sentiment Polarity Table', 'Jockers Sentiment Data Set'), | ||
stringsAsFactors = FALSE | ||
)) | ||
dat <- dat[order(dat[['Data']]),] | ||
row.names(dat) <- NULL | ||
dat | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ | |
NULL | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.