From ae68857d49ce8273e47b3ea0efb41b02e86c86de Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Thu, 28 Oct 2021 17:41:43 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20funci=C3=B3n=20sqlInitialize=20y?= =?UTF-8?q?=20TOC=20a=20la=20documentaci=C3=B3n.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Docs/sqlFunctions-doc.Rmd | 44 +++++++++++++++++++++++++++++- Docs/sqlFunctions-doc.html | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/Docs/sqlFunctions-doc.Rmd b/Docs/sqlFunctions-doc.Rmd index a6d750c..5d50554 100644 --- a/Docs/sqlFunctions-doc.Rmd +++ b/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") +} +``` + diff --git a/Docs/sqlFunctions-doc.html b/Docs/sqlFunctions-doc.html index 63ad704..f9a4661 100644 --- a/Docs/sqlFunctions-doc.html +++ b/Docs/sqlFunctions-doc.html @@ -167,7 +167,14 @@ pre code { +
Loads required libraries and gets the db location.
+sqlInitialize()
+Argument | +Description | +
---|
Loads required libraries and gets the db location from “ruta_database.R” file.
+Invisibly for success (and failures cause errors).
+sqlInitialize()
+sqlInitialize<-function(){
+ library(tidyverse)
+ library(RODBC)
+ library(openxlsx)
+
+ ## Conexión a la base de datos
+ source("ruta_database.R", encoding = "UTF-8")
+}