Skip to content

Commit

Permalink
dplyr::all_of()
Browse files Browse the repository at this point in the history
  • Loading branch information
lgessl committed Nov 21, 2023
1 parent a14dd7a commit cb2b132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/read.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ read <- function(
# expression to matrix
gene_names <- res[["expr"]][[gene_id_col]]
expr_mat <- expr_tbl |>
dplyr::select(!all_of(gene_id_col)) |>
dplyr::select(!dplyr::all_of(gene_id_col)) |>
as.matrix() |>
t()
colnames(expr_mat) <- gene_names

# pheno: move patient ids into first column
pheno_tbl <- pheno_tbl |>
dplyr::relocate(all_of(patient_id_col))
dplyr::relocate(dplyr::all_of(patient_id_col))

return(res)
}

0 comments on commit cb2b132

Please sign in to comment.