Browse Source

Añadido función sqlInitialize y TOC a la documentación.

main
Costa 3 years ago
parent
commit
ae68857d49
2 changed files with 98 additions and 1 deletions
  1. +43
    -1
      Docs/sqlFunctions-doc.Rmd
  2. +55
    -0
      Docs/sqlFunctions-doc.html

+ 43
- 1
Docs/sqlFunctions-doc.Rmd

@ -1,12 +1,16 @@
---
title: "sqlFunctions-Doc"
output: html_document
output:
html_document:
toc: true
toc_depth: 2
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
---
## sqlDropLast
@ -43,3 +47,41 @@ sqlDropLast<-function(conn, tablename, droplast=1){
sqlSave(conn, table, tablename = tablename, safer = F)
}
```
---
## sqlInitizalize
### Description
Loads required libraries and gets the db location.
### Usage
sqlInitialize()
### Arguments
Argument|Description
---|---
### Details
Loads required libraries and gets the db location from "ruta_database.R" file.
### Value
Invisibly for success (and failures cause errors).
### Examples
```r
sqlInitialize()
```
### Function
```r
sqlInitialize<-function(){
library(tidyverse)
library(RODBC)
library(openxlsx)
## Conexión a la base de datos
source("ruta_database.R", encoding = "UTF-8")
}
```

+ 55
- 0
Docs/sqlFunctions-doc.html

@ -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&lt;-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&lt;-function(){
library(tidyverse)
library(RODBC)
library(openxlsx)
## Conexión a la base de datos
source(&quot;ruta_database.R&quot;, encoding = &quot;UTF-8&quot;)
}</code></pre>
</div>
</div>

Loading…
Cancel
Save