EVOLUTION-MANAGER
Edit File: get_sentiments.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Get a tidy data frame of a single sentiment lexicon</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for get_sentiments {tidytext}"><tr><td>get_sentiments {tidytext}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Get a tidy data frame of a single sentiment lexicon</h2> <h3>Description</h3> <p>Get specific sentiment lexicons in a tidy format, with one row per word, in a form that can be joined with a one-word-per-row dataset. The <code>"bing"</code> option comes from the included <code><a href="sentiments.html">sentiments</a></code> data frame, and others call the relevant function in the <span class="pkg">textdata</span> package. </p> <h3>Usage</h3> <pre> get_sentiments(lexicon = c("bing", "afinn", "loughran", "nrc")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>lexicon</code></td> <td> <p>The sentiment lexicon to retrieve; either "afinn", "bing", "nrc", or "loughran"</p> </td></tr> </table> <h3>Value</h3> <p>A tbl_df with a <code>word</code> column, and either a <code>sentiment</code> column (if <code>lexicon</code> is not "afinn") or a numeric <code>value</code> column (if <code>lexicon</code> is "afinn"). </p> <h3>Examples</h3> <pre> library(dplyr) get_sentiments("bing") ## Not run: get_sentiments("afinn") get_sentiments("nrc") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>tidytext</em> version 0.3.4 <a href="00Index.html">Index</a>]</div> </body></html>