View source: R/olink_normalization_utils.R
| olink_norm_input_check_df_cols | R Documentation |
This function takes as input a named list of datasets and checks if their columns allow the normalization to be performed. The input may contain "tibble", "ArrowTable" or a mixture of them.
olink_norm_input_check_df_cols(lst_df, lst_cols)
lst_df |
Named list of datasets to be normalized. |
lst_cols |
Named list of check logs returned by |
NULL unless there is an error.
Klev Diamanti
# One dataset
lst_df_v1 <- list(
"p1" = npx_data1
) |>
lapply(function(l_df) {
l_df |>
dplyr::select(
-dplyr::any_of(c("Normalization"))
)
})
lst_df_v1_check <- lst_df_v1 |>
lapply(function(.x) {
check_npx(df = .x) |>
suppressWarnings() |>
suppressMessages() |>
(\(.) .$col_names)()
})
OlinkAnalyze:::olink_norm_input_check_df_cols(
lst_df = lst_df_v1,
lst_cols = lst_df_v1_check
)
# Two datasets
lst_df_v2 <- list(
"p1" = npx_data1,
"p2" = npx_data2
) |>
lapply(function(l_df) {
l_df |>
dplyr::select(
-dplyr::any_of(c("Normalization"))
)
})
lst_df_v2_check <- lst_df_v2 |>
lapply(function(.x) {
check_npx(df = .x) |>
suppressWarnings() |>
suppressMessages() |>
(\(.) .$col_names)()
})
OlinkAnalyze:::olink_norm_input_check_df_cols(
lst_df = lst_df_v2,
lst_cols = lst_df_v2_check
)
# Multiple datasets
lst_df_v3 <- list(
"p1" = npx_data1,
"p2" = npx_data2,
"p3" = npx_data1,
"p4" = npx_data2
) |>
lapply(function(l_df) {
l_df |>
dplyr::select(
-dplyr::any_of(c("Normalization"))
)
})
lst_df_v3_check <- lst_df_v3 |>
lapply(function(.x) {
check_npx(df = .x) |>
suppressWarnings() |>
suppressMessages() |>
(\(.) .$col_names)()
})
OlinkAnalyze:::olink_norm_input_check_df_cols(
lst_df = lst_df_v3,
lst_cols = lst_df_v3_check
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.