Skip to content

Commit

Permalink
update docs and lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
js3110 committed Jan 2, 2025
1 parent f2f9b0a commit 90ecb47
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions R/label_operators.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion inst/shiny/functions/generate_col_defs.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ generate_col_defs <- function(data) {
}
}) |>
setNames(names(data))
}
}
2 changes: 1 addition & 1 deletion inst/shiny/functions/mapping_selectize_inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}
}
2 changes: 1 addition & 1 deletion inst/shiny/modules/column_mapping.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,4 @@ column_mapping_server <- function(id, data, manual_units, on_submit) {
grouping_variables = grouping_variables
)
})
}
}
2 changes: 1 addition & 1 deletion inst/shiny/modules/tab_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ tab_data_server <- function(id) {
grouping_variables = grouping_variables
)
})
}
}
5 changes: 3 additions & 2 deletions man/apply_labels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-apply_labels.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ describe("apply_labels", {
expect_equal(attr(data$COL1, "label"), "COL1")
expect_equal(attr(data$COL2, "label"), "COL2")
})
})
})
2 changes: 1 addition & 1 deletion tests/testthat/test-generate_col_defs.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ describe("generate_col_defs", {
col_defs <- generate_col_defs(data)
expect_type(col_defs, "list")
})
})
})

0 comments on commit 90ecb47

Please sign in to comment.