EVOLUTION-MANAGER
Edit File: calc_self_sim.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: Calculate a self-similarity matrix</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 calc_self_sim {genius}"><tr><td>calc_self_sim {genius}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Calculate a self-similarity matrix</h2> <h3>Description</h3> <p>Calculate the self-similarity matrix for song lyrics. </p> <h3>Usage</h3> <pre> calc_self_sim( df, lyric_col, output = "tidy", remove_stop_words = FALSE, language = "en", source = "snowball" ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>df</code></td> <td> <p>The data frame containing song lyrics. Usually from the output of <code>`genius_lyrics()`</code>.</p> </td></tr> <tr valign="top"><td><code>lyric_col</code></td> <td> <p>The unquoted name of the column containing lyrics</p> </td></tr> <tr valign="top"><td><code>output</code></td> <td> <p>Determine the type of output. Default is <code>"tidy"</code>. Set to <code>"matrix"</code> for the raw matrix.</p> </td></tr> <tr valign="top"><td><code>remove_stop_words</code></td> <td> <p>Optional argument to remove stop words from self-similarity matrix.</p> </td></tr> <tr valign="top"><td><code>language</code></td> <td> <p>Language of stop words. See <code>tidytext::get_stopwords()</code>.</p> </td></tr> <tr valign="top"><td><code>source</code></td> <td> <p>Stop words source. See <code>tidytext::get_stopwords()</code>.</p> </td></tr> </table> <h3>Examples</h3> <pre> # bad_habits <- genius_lyrics("Alix", "Bad Habits") # self_sim <- calc_self_sim(bad_habits, lyric) </pre> <hr /><div style="text-align: center;">[Package <em>genius</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>