nest
A tbl. (See tidyr)
Name-variable pairs of the form new_col=c(col1, col2, col3) (See tidyr)
See ?tidyr::nest
A tidySingleCellExperiment objector a tibble depending on input
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:tidySingleCellExperiment’:
#>
#> bind_cols, bind_rows
#> The following object is masked from ‘package:Biobase’:
#>
#> combine
#> The following objects are masked from ‘package:GenomicRanges’:
#>
#> intersect, setdiff, union
#> The following object is masked from ‘package:GenomeInfoDb’:
#>
#> intersect
#> The following objects are masked from ‘package:IRanges’:
#>
#> collapse, desc, intersect, setdiff, slice, union
#> The following objects are masked from ‘package:S4Vectors’:
#>
#> first, intersect, rename, setdiff, setequal, union
#> The following objects are masked from ‘package:BiocGenerics’:
#>
#> combine, intersect, setdiff, union
#> The following object is masked from ‘package:matrixStats’:
#>
#> count
#> The following objects are masked from ‘package:ttservice’:
#>
#> bind_cols, bind_rows
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
pbmc_small %>%
nest(data=-groups) %>%
unnest(data)
#> # A SingleCellExperiment-tibble abstraction: 80 × 17
#> # Features=230 | Cells=80 | Assays=counts, logcounts
#> .cell orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8 letter.idents
#> <chr> <fct> <dbl> <int> <fct> <fct>
#> 1 ATGCCAGAACG… SeuratPro… 70 47 0 A
#> 2 GAACCTGATGA… SeuratPro… 87 50 1 B
#> 3 TGACTGGATTC… SeuratPro… 127 56 0 A
#> 4 AGTCAGACTGC… SeuratPro… 173 53 0 A
#> 5 AGGTCATGAGT… SeuratPro… 62 31 0 A
#> 6 GGGTAACTCTA… SeuratPro… 101 41 0 A
#> 7 CATGAGACACG… SeuratPro… 51 26 0 A
#> 8 TACGCCACTCC… SeuratPro… 99 45 0 A
#> 9 GTAAGCACTCA… SeuratPro… 67 33 0 A
#> 10 TACATCACGCT… SeuratPro… 109 41 0 A
#> # ℹ 70 more rows
#> # ℹ 11 more variables: RNA_snn_res.1 <fct>, file <chr>, ident <fct>,
#> # groups <chr>, PC_1 <dbl>, PC_2 <dbl>, PC_3 <dbl>, PC_4 <dbl>, PC_5 <dbl>,
#> # tSNE_1 <dbl>, tSNE_2 <dbl>