EVOLUTION-MANAGER
Edit File: add_genius.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: Add lyrics to a data frame</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 add_genius {genius}"><tr><td>add_genius {genius}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add lyrics to a data frame</h2> <h3>Description</h3> <p>This function is to be used to build on a data frame with artist and album/track information. To use the function with a data frame of mixed type (albums and tracks), create another column that specifies type. The type values are '"album"'and '"lyrics"'. </p> <h3>Usage</h3> <pre> add_genius(data, artist, title, type = c("album", "track", "lyrics")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>data</code></td> <td> <p>This is a dataframe with one column for the artist name, and the other column being either the track title or the album title.</p> </td></tr> <tr valign="top"><td><code>artist</code></td> <td> <p>This is the column which has artist title information</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>This is the column that has either album titles, track titles, or both.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>This is a single value character string of either "album" or "track". This tells the function what kind of lyrics to pull. Alternatively, this can be a column with the value of "album" or "track" associated with each row. "lyric" can be used for backward compatibility.</p> </td></tr> </table> <h3>Examples</h3> <pre> # # Albums only # # artist_albums <- tibble::tribble( # ~artist, ~album, # "J. Cole", "KOD", # "Sampha", "Process" # ) # # add_genius(artist_albums, artist, album, type = "album") # # # Individual Tracks only # # artist_songs <- tibble::tribble( # ~artist, ~track, # "J. Cole", "Motiv8", # "Andrew Bird", "Anonanimal" # ) # # # Tracks and Albums # mixed_type <- tibble::tribble( # ~artist, ~album, ~type, # "J. Cole", "KOD", "album", # "Andrew Bird", "Proxy War", "track" # ) # # add_genius(mixed_type, artist, album, type) # add_genius(artist_songs, artist, track, type = "track") </pre> <hr /><div style="text-align: center;">[Package <em>genius</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>