From 84ce7620aa04a9653eff390f7cc5d2b425b65d97 Mon Sep 17 00:00:00 2001 From: Dan Chaltiel Date: Wed, 29 Nov 2023 21:05:44 +0100 Subject: [PATCH] revert to export get_lookup() --- NAMESPACE | 1 + NEWS.md | 2 -- R/helpers.R | 3 +-- man/get_lookup.Rd | 24 ++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 man/get_lookup.Rd diff --git a/NAMESPACE b/NAMESPACE index da39cd4..2441081 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,6 +15,7 @@ export(find_keyword) export(get_7z_dir) export(get_datasets) export(get_key_cols) +export(get_lookup) export(load_as_list) export(load_list) export(manual_correction) diff --git a/NEWS.md b/NEWS.md index 1b8f1e2..40db22a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -49,8 +49,6 @@ tibble(subjid=c(1:10, 1)) %>% assert_no_duplicate() %>% nrow() - Options `edc_id`, `edc_crfname`, and `edc_verbose` have been respectively renamed `edc_cols_id`, `edc_cols_crfname`, and `edc_read_verbose` for more clarity. -- Some internal functions were inappropriately exported and are no longer: - # EDCimport 0.3.0 2023/05/19 diff --git a/R/helpers.R b/R/helpers.R index 823b2f8..7212f1d 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -403,8 +403,7 @@ save_list = function(x, filename){ #' library(tidyr) #' tl %>% unnest(everything()) #' -#' @noRd -#' @keywords internal +#' @export #' @importFrom cli cli_abort #' @importFrom dplyr arrange mutate #' @importFrom labelled var_label diff --git a/man/get_lookup.Rd b/man/get_lookup.Rd new file mode 100644 index 0000000..6ed30c8 --- /dev/null +++ b/man/get_lookup.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{get_lookup} +\alias{get_lookup} +\title{Generate a lookup table} +\usage{ +get_lookup(data_list) +} +\arguments{ +\item{data_list}{a list containing at least 1 dataframe} +} +\value{ +a dataframe summarizing column names and labels +} +\description{ +Generate a lookup table +} +\examples{ +tl = list(r=crosstable::iris2, x=mtcars) \%>\% get_lookup() +tl +library(tidyr) +tl \%>\% unnest(everything()) + +}