|
|
@ -167,7 +167,14 @@ pre code { |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="TOC"> |
|
|
|
<ul> |
|
|
|
<li><a href="#sqldroplast">sqlDropLast</a></li> |
|
|
|
<li><a href="#sqlinitizalize">sqlInitizalize</a></li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
|
|
|
|
<hr /> |
|
|
|
<div id="sqldroplast" class="section level2"> |
|
|
|
<h2>sqlDropLast</h2> |
|
|
|
<div id="description" class="section level3"> |
|
|
@ -227,6 +234,54 @@ sqlDropLast(dta, "TableTest") |
|
|
|
table<-table[1:(nrow(table)-droplast),] |
|
|
|
sqlSave(conn, table, tablename = tablename, safer = F) |
|
|
|
}</code></pre> |
|
|
|
<hr /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="sqlinitizalize" class="section level2"> |
|
|
|
<h2>sqlInitizalize</h2> |
|
|
|
<div id="description-1" class="section level3"> |
|
|
|
<h3>Description</h3> |
|
|
|
<p>Loads required libraries and gets the db location.</p> |
|
|
|
</div> |
|
|
|
<div id="usage-1" class="section level3"> |
|
|
|
<h3>Usage</h3> |
|
|
|
<p>sqlInitialize()</p> |
|
|
|
</div> |
|
|
|
<div id="arguments-1" class="section level3"> |
|
|
|
<h3>Arguments</h3> |
|
|
|
<table> |
|
|
|
<thead> |
|
|
|
<tr class="header"> |
|
|
|
<th>Argument</th> |
|
|
|
<th>Description</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<div id="details-1" class="section level3"> |
|
|
|
<h3>Details</h3> |
|
|
|
<p>Loads required libraries and gets the db location from “ruta_database.R” file.</p> |
|
|
|
</div> |
|
|
|
<div id="value-1" class="section level3"> |
|
|
|
<h3>Value</h3> |
|
|
|
<p>Invisibly for success (and failures cause errors).</p> |
|
|
|
</div> |
|
|
|
<div id="examples-1" class="section level3"> |
|
|
|
<h3>Examples</h3> |
|
|
|
<pre class="r"><code>sqlInitialize()</code></pre> |
|
|
|
</div> |
|
|
|
<div id="function-1" class="section level3"> |
|
|
|
<h3>Function</h3> |
|
|
|
<pre class="r"><code>sqlInitialize<-function(){ |
|
|
|
library(tidyverse) |
|
|
|
library(RODBC) |
|
|
|
library(openxlsx) |
|
|
|
|
|
|
|
## Conexión a la base de datos |
|
|
|
source("ruta_database.R", encoding = "UTF-8") |
|
|
|
}</code></pre> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|