as_matrix_except_first_column | R Documentation |
after pivoting a long-format tibble to wide-format, use this function to easily convert to a matrix (e.g. for efficient numerical computation using the matrixStats package)
as_matrix_except_first_column(x)
x |
a wide-format data.frame or tibble where the first column are assumed to represent unique row identifiers and other columns assumed 'data' columns for the output matrix |
## Not run:
m = as_matrix_except_first_column(dataset$peptides %>%
pivot_wider(id_cols = "peptide_id", names_from = "sample_id", values_from = "intensity")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.