Skip to contents

Convert sample metadata from a tibble to a dataframe with sample IDs as row names

Usage

meta_tbl_to_dat(meta_tbl)

Arguments

meta_tbl

tibble with sample_id column

Value

dataframe where row names are the sample IDs

Examples

sample_meta_tbl <- readr::read_tsv(system.file("extdata",
  "sample_metadata.tsv",
  package = "reneeTools"
))
#> Rows: 4 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (2): sample_id, condition
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(sample_meta_tbl)
#> # A tibble: 4 × 2
#>   sample_id condition
#>   <chr>     <chr>    
#> 1 KO_S3     knockout 
#> 2 KO_S4     knockout 
#> 3 WT_S1     wildtype 
#> 4 WT_S2     wildtype 
meta_tbl_to_dat(sample_meta_tbl)
#>       condition
#> KO_S3  knockout
#> KO_S4  knockout
#> WT_S1  wildtype
#> WT_S2  wildtype