diff --git a/R/label_operators.R b/R/label_operators.R index 3ab560a6..b2723926 100644 --- a/R/label_operators.R +++ b/R/label_operators.R @@ -1,10 +1,10 @@ #' Apply Labels to a dataset #' #' This function adds "label" attributes to all columns in a dataset -#' Using the labels_app.csv file which contains common labels for ADPP -#' and ADPC column names #' #' @param data The dataset to which labels will be applied. +#' @param labels_file A data frame with two columns: Variable and Label, +#' for the dataset you are applying it . #' #' @return The same dataset with label attributes applied to all columns. #' If a column is not present in the labels list, it will be assigned the name of the col. diff --git a/inst/shiny/functions/generate_col_defs.R b/inst/shiny/functions/generate_col_defs.R index 796524ea..2038ac28 100644 --- a/inst/shiny/functions/generate_col_defs.R +++ b/inst/shiny/functions/generate_col_defs.R @@ -41,4 +41,4 @@ generate_col_defs <- function(data) { } }) |> setNames(names(data)) -} \ No newline at end of file +} diff --git a/inst/shiny/functions/mapping_selectize_inputs.R b/inst/shiny/functions/mapping_selectize_inputs.R index 62bf77ed..b4f67a82 100644 --- a/inst/shiny/functions/mapping_selectize_inputs.R +++ b/inst/shiny/functions/mapping_selectize_inputs.R @@ -51,4 +51,4 @@ update_selectize_inputs <- function(session, input_ids, column_names, manual_uni session, "select_Grouping_Variables", choices = setdiff(column_names, desired_order) ) -} \ No newline at end of file +} diff --git a/inst/shiny/modules/column_mapping.R b/inst/shiny/modules/column_mapping.R index 9a0b1b9f..827f1812 100644 --- a/inst/shiny/modules/column_mapping.R +++ b/inst/shiny/modules/column_mapping.R @@ -355,4 +355,4 @@ column_mapping_server <- function(id, data, manual_units, on_submit) { grouping_variables = grouping_variables ) }) -} \ No newline at end of file +} diff --git a/inst/shiny/modules/tab_data.R b/inst/shiny/modules/tab_data.R index 25de5375..d61a5ff1 100644 --- a/inst/shiny/modules/tab_data.R +++ b/inst/shiny/modules/tab_data.R @@ -184,4 +184,4 @@ tab_data_server <- function(id) { grouping_variables = grouping_variables ) }) -} \ No newline at end of file +} diff --git a/man/apply_labels.Rd b/man/apply_labels.Rd index f03dd5d9..932505b2 100644 --- a/man/apply_labels.Rd +++ b/man/apply_labels.Rd @@ -8,6 +8,9 @@ apply_labels(data, labels_file) } \arguments{ \item{data}{The dataset to which labels will be applied.} + +\item{labels_file}{A data frame with two columns: Variable and Label, +for the dataset you are applying it .} } \value{ The same dataset with label attributes applied to all columns. @@ -15,8 +18,6 @@ If a column is not present in the labels list, it will be assigned the name of t } \description{ This function adds "label" attributes to all columns in a dataset -Using the labels_app.csv file which contains common labels for ADPP -and ADPC column names } \examples{ \dontrun{ diff --git a/tests/testthat/test-apply_labels.R b/tests/testthat/test-apply_labels.R index 960b0077..9fb0e8e7 100644 --- a/tests/testthat/test-apply_labels.R +++ b/tests/testthat/test-apply_labels.R @@ -26,4 +26,4 @@ describe("apply_labels", { expect_equal(attr(data$COL1, "label"), "COL1") expect_equal(attr(data$COL2, "label"), "COL2") }) -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-generate_col_defs.R b/tests/testthat/test-generate_col_defs.R index 1e95c4cc..735f2013 100644 --- a/tests/testthat/test-generate_col_defs.R +++ b/tests/testthat/test-generate_col_defs.R @@ -20,4 +20,4 @@ describe("generate_col_defs", { col_defs <- generate_col_defs(data) expect_type(col_defs, "list") }) -}) \ No newline at end of file +})