[Maturing]

as_tibble() turns a SummarizedExperiment existing object into a so-called tibble, a data frame with class tbl_df.

Arguments

x

A SummarizedExperiment

...

This parameter includes .subset that can be set to any tidyselect expression. For example .subset = c(sample, type), or .subset = contains("PC").

Value

A tibble

Examples


tidySummarizedExperiment::pasilla %>%
    as_tibble()
#> # A tibble: 102,193 × 5
#>    .feature    .sample counts condition type      
#>    <chr>       <chr>    <int> <chr>     <chr>     
#>  1 FBgn0000003 untrt1       0 untreated single_end
#>  2 FBgn0000008 untrt1      92 untreated single_end
#>  3 FBgn0000014 untrt1       5 untreated single_end
#>  4 FBgn0000015 untrt1       0 untreated single_end
#>  5 FBgn0000017 untrt1    4664 untreated single_end
#>  6 FBgn0000018 untrt1     583 untreated single_end
#>  7 FBgn0000022 untrt1       0 untreated single_end
#>  8 FBgn0000024 untrt1      10 untreated single_end
#>  9 FBgn0000028 untrt1       0 untreated single_end
#> 10 FBgn0000032 untrt1    1446 untreated single_end
#> # ℹ 102,183 more rows
    
tidySummarizedExperiment::pasilla %>%
    as_tibble(.subset = -c(condition, type))     
#> # A tibble: 102,193 × 3
#>    .feature    .sample counts
#>    <chr>       <chr>    <int>
#>  1 FBgn0000003 untrt1       0
#>  2 FBgn0000008 untrt1      92
#>  3 FBgn0000014 untrt1       5
#>  4 FBgn0000015 untrt1       0
#>  5 FBgn0000017 untrt1    4664
#>  6 FBgn0000018 untrt1     583
#>  7 FBgn0000022 untrt1       0
#>  8 FBgn0000024 untrt1      10
#>  9 FBgn0000028 untrt1       0
#> 10 FBgn0000032 untrt1    1446
#> # ℹ 102,183 more rows