From f8e75a4d90a9054e05454adf627205338e3f217c Mon Sep 17 00:00:00 2001 From: Steve Vissault Date: Tue, 2 Apr 2024 16:03:14 -0400 Subject: [PATCH] Adjust NAMESPACE --- DESCRIPTION | 3 +-- NAMESPACE | 1 + R/dbs_integration.R | 4 ++-- man/dbs_integration.Rd | 14 ++++++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 man/dbs_integration.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 493058b..ba72509 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,8 +15,7 @@ Imports: cli (>= 3.6.2), readxl (>= 1.4.3), tidyr (>= 1.3.1), - purrr (>= 1.0.2), - janitor (>= 2.2.0) + purrr (>= 1.0.2) Suggests: devtools (>= 2.2.0), testthat (>= 3.0.0), diff --git a/NAMESPACE b/NAMESPACE index 37875ff..406c3a2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(dbs_integration) export(detect_cens) export(remove_cens) export(uncensored) diff --git a/R/dbs_integration.R b/R/dbs_integration.R index c68981f..2520e26 100644 --- a/R/dbs_integration.R +++ b/R/dbs_integration.R @@ -2,7 +2,7 @@ #' #' @description This function is a quick integration procedure among all Excel files. #' -#' @return a data.frame of contaminants +#' @return a data.frame of all contaminant measurements #' @export dbs_integration <- function(){ contaminants_mapping <- list( @@ -95,7 +95,7 @@ dbs_integration <- function(){ readxl::read_excel(tmp_file, sheet = n) |> dplyr::select("Year", "Location", "SampleID", "Species", s[1]:s[2]) |> dplyr::mutate(source = f$path, conpound_family = n) |> - dplyr::mutate(across(everything(), as.character)) |> + dplyr::mutate(dplyr::across(everything(), as.character)) |> tidyr::pivot_longer(cols = s[1]:s[2], names_to = "variable") |> dplyr::filter(!is.na(value)) }) |> dplyr::bind_rows() diff --git a/man/dbs_integration.Rd b/man/dbs_integration.Rd new file mode 100644 index 0000000..4644776 --- /dev/null +++ b/man/dbs_integration.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/dbs_integration.R +\name{dbs_integration} +\alias{dbs_integration} +\title{Get integrated data} +\usage{ +dbs_integration() +} +\value{ +a data.frame of all contaminant measurements +} +\description{ +This function is a quick integration procedure among all Excel files. +}