EVOLUTION-MANAGER
Edit File: lahman.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: Cache and retrieve an 'src_sqlite' of the Lahman baseball...</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 lahman {dbplyr}"><tr><td>lahman {dbplyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Cache and retrieve an <code>src_sqlite</code> of the Lahman baseball database.</h2> <h3>Description</h3> <p>This creates an interesting database using data from the Lahman baseball data source, provided by Sean Lahman at <a href="http://www.seanlahman.com/baseball-archive/statistics/">http://www.seanlahman.com/baseball-archive/statistics/</a>, and made easily available in R through the <span class="pkg">Lahman</span> package by Michael Friendly, Dennis Murphy and Martin Monkman. See the documentation for that package for documentation of the individual tables. </p> <h3>Usage</h3> <pre> lahman_sqlite(path = NULL) lahman_postgres(dbname = "lahman", host = "localhost", ...) lahman_mysql(dbname = "lahman", ...) copy_lahman(con, ...) has_lahman(type, ...) lahman_srcs(..., quiet = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>Other arguments passed to <code>src</code> on first load. For MySQL and PostgreSQL, the defaults assume you have a local server with <code>lahman</code> database already created. For <code>lahman_srcs()</code>, character vector of names giving srcs to generate.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>src type.</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>if <code>TRUE</code>, suppress messages about databases failing to connect.</p> </td></tr> </table> <h3>Examples</h3> <pre> # Connect to a local sqlite database, if already created library(dplyr) if (has_lahman("sqlite")) { lahman_sqlite() batting <- tbl(lahman_sqlite(), "Batting") batting } # Connect to a local postgres database with lahman database, if available if (has_lahman("postgres")) { lahman_postgres() batting <- tbl(lahman_postgres(), "Batting") } </pre> <hr /><div style="text-align: center;">[Package <em>dbplyr</em> version 1.4.4 <a href="00Index.html">Index</a>]</div> </body></html>