diff --git a/404.html b/404.html index 6f9ae0a..830efef 100644 --- a/404.html +++ b/404.html @@ -101,7 +101,7 @@
Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.
diff --git a/authors.html b/authors.html index 82b91d0..665fa2b 100644 --- a/authors.html +++ b/authors.html @@ -71,9 +71,9 @@Verschelde, Pieter (2024) inbolims: Utilities to query the INBO lab analysis datawarehouse. Version 0.2.10. https://inbo.github.io/inbolims/
+Verschelde, Pieter (2024) inbolims: Utilities to query the INBO lab analysis datawarehouse. Version 0.2.11. https://inbo.github.io/inbolims/
@Manual{, - title = {inbolims: Utilities to query the INBO lab analysis datawarehouse. Version 0.2.10}, + title = {inbolims: Utilities to query the INBO lab analysis datawarehouse. Version 0.2.11}, author = {Pieter Verschelde}, year = {2024}, url = {https://inbo.github.io/inbolims/}, @@ -92,7 +92,7 @@+Citation
diff --git a/index.html b/index.html index 0dd290d..e2395ff 100644 --- a/index.html +++ b/index.html @@ -112,14 +112,19 @@Eerste gebruiklibrary(inbolims) #maak connectie met databank -connection <- lims_connect() - -#haal de rapportgegevens binnen uit de databank +connection <- lims_connect()
Je kan op voorhand al de staalinformatie ophalen via lims_sample_information. Je kan je project selecteren. Dit mogen er ook meerdere zijn en eventueel joker karakters mogen ook gebruikt worden.
+Standaard worden defaultvelden getoond, maar je kan zelf ook kiezen welke velden je wil zien eventueel gecombineerd met een template, met de variabele fields.
+Via de functie sample_fields_from_template
kan je te weten komen welke templates beschikbaar zijn en welke velden onderdeem uitmaken in elk van de templates. Met de functie lims_table_fields
kan je voor elke tabel zien welke velden het datawarehouse in aanbieding heeft.
#illustratieve stap: krijg de staalinformatie (optioneel)
+staal_info <- lims_sample_information(connection, project = c("I-19W001-02"))
+De belangrijkste functie is het inlezen van alle rapportdata. In de toekomst zal die functie ook verbeterd worden zodat ook gemakkelijk kan achterhaald worden wat er historisch allemaal bestond van analyse- en componentnamen.
+#haal de rapportgegevens binnen uit de databank
rapport_data <- read_lims_data(connection = connection,
project = c("I-19W001-02"),
sql_template = "default",
show_query = FALSE)
-
+
Bovenstaande code haalt de data op voor het project I-19W001-02 (project = “I-19W001-02”) volgens de standaardtemplate (template = “default”) en de query die gebruikt is om het datawarehouse te bevragen wordt getoond (show_query = TRUE). Als eerste variabele moet de databank connectie opgegeven worden, zodat de routine weet waar de gegevens uit gehaald moeten worden.
lims_result_statistics()
Title
Verkrijg de sample informatie
Get all availaible column names from a table in the data warehouse
read_lims_data()
Haal rapportdata uit LIMS DWH
Velden uit sample_field_template
R/lims_sample_information.R
+ lims_sample_information.Rd
Verkrijg de informatie van stalen voor gekozen projecten
+lims_sample_information(con, project, fields = "template:default")
connectie naar lims dwh
een character string met projecten, eventueel met SQL jokertekens "%" en "_"
welke velden wil je terugkrijgen, indien het begint met "template:" wordt een staaltemplate gekozen , anders is dat gewoon een vector van velden. Je kan "template:" en eigen veldnamen combineren bv. c("template:default", "FieldObserver", "FieldSamplingDate")
tibble met sample informatie
+library(inbolims)
+con <- lims_connect()
+#> Error in pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE): ! ODBC failed with error 00000 from [unixODBC][Driver Manager].
+#> ✖ Can't open lib 'SQL Server' : file not found
+#> ℹ From nanodbc/nanodbc.cpp:1150.
+sample_info <- lims_sample_information(con, project = "I-20G%")
+#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbGetQuery': object 'con' not found
+sample_info <-
+lims_sample_information(
+ con,
+ project = c("I-19G024-01", "I-20G%"),
+ fields = c("template:default", "FieldSamplingDate"))
+#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbGetQuery': object 'con' not found
+
R/lims_table_fields.R
+ lims_table_fields.Rd
Get all availaible column names from a table in the data warehouse
+lims_table_fields(con, table_name, export_type = "character")
character vector with column names of the table
+library(inbolims)
+con <- lims_connect()
+#> Error in pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE): ! ODBC failed with error 00000 from [unixODBC][Driver Manager].
+#> ✖ Can't open lib 'SQL Server' : file not found
+#> ℹ From nanodbc/nanodbc.cpp:1150.
+lims_table_fields(con, "dimSample")
+#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbGetQuery': object 'con' not found
+
R/sample_fields_from_template.R
+ sample_fields_from_template.Rd
Velden uit sample_field_template
+sample_fields_from_template(template)
character vector met kolomnamen
+sample_fields_from_template("default")
+#> [1] "Project" "LabSampleID"
+#> [3] "FieldSampleID" "LIMSOriginalSampleNumber"
+#> [5] "SampleStatus"
+