Skip to content

Commit b4ecbb3

Browse files
authored
Merge pull request #41 from stemangiola/print_hotifx
Print hotifx
2 parents bdf1c53 + e3a10c6 commit b4ecbb3

File tree

9 files changed

+148
-291
lines changed

9 files changed

+148
-291
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Type: Package
22
Package: tidySingleCellExperiment
33
Title: Brings SingleCellExperiment to the Tidyverse
4-
Version: 1.7.0
4+
Version: 1.7.2
55
Authors@R: c(person("Stefano", "Mangiola", email = "[email protected]",
66
role = c("aut", "cre")) )
77
Description: tidySingleCellExperiment is an adapter that abstracts the 'SingleCellExperiment' container
8-
in the form of tibble and allows the data manipulation, plotting and nesting using 'tidyverse'
8+
in the form of tibble and allows the data manipulation, plotting and nesting using 'tidyverse'.
99
License: GPL-3
1010
Depends:
1111
R (>= 4.0.0),
@@ -27,6 +27,7 @@ Imports:
2727
S4Vectors,
2828
tidyselect,
2929
ellipsis,
30+
vctrs,
3031
pillar,
3132
stringr,
3233
cli,

NAMESPACE

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ S3method(select,SingleCellExperiment)
3737
S3method(separate,SingleCellExperiment)
3838
S3method(slice,SingleCellExperiment)
3939
S3method(summarise,SingleCellExperiment)
40+
S3method(tbl_format_header,tidySingleCellExperiment)
4041
S3method(tidy,SingleCellExperiment)
4142
S3method(unite,SingleCellExperiment)
4243
S3method(unnest,tidySingleCellExperiment_nested)
@@ -72,6 +73,7 @@ export(select)
7273
export(separate)
7374
export(slice)
7475
export(summarise)
76+
export(tbl_format_header)
7577
export(tidy)
7678
export(unite)
7779
export(unnest)
@@ -114,9 +116,10 @@ importFrom(lifecycle,deprecate_warn)
114116
importFrom(magrittr,"%$%")
115117
importFrom(magrittr,"%>%")
116118
importFrom(methods,as)
117-
importFrom(pillar,extra_cols)
118-
importFrom(pillar,squeeze)
119+
importFrom(pillar,align)
120+
importFrom(pillar,get_extent)
119121
importFrom(pillar,style_subtle)
122+
importFrom(pillar,tbl_format_header)
120123
importFrom(plotly,plot_ly)
121124
importFrom(purrr,imap)
122125
importFrom(purrr,map)
@@ -141,7 +144,6 @@ importFrom(stringr,str_replace)
141144
importFrom(tibble,as_tibble)
142145
importFrom(tibble,enframe)
143146
importFrom(tibble,glimpse)
144-
importFrom(tibble,trunc_mat)
145147
importFrom(tidyr,extract)
146148
importFrom(tidyr,nest)
147149
importFrom(tidyr,pivot_longer)
@@ -152,3 +154,4 @@ importFrom(tidyr,unnest)
152154
importFrom(tidyselect,eval_select)
153155
importFrom(ttservice,join_features)
154156
importFrom(utils,tail)
157+
importFrom(vctrs,new_data_frame)

R/pillar_utilities.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
NBSP <- "\U00A0"
2+
3+
pillar___format_comment = function (x, width)
4+
{
5+
if (length(x) == 0L) {
6+
return(character())
7+
}
8+
map_chr(x, pillar___wrap, prefix = "# ", width = min(width, cli::console_width()))
9+
}
10+
11+
#' @importFrom fansi strwrap_ctl
12+
pillar___strwrap2 = function (x, width, indent)
13+
{
14+
fansi::strwrap_ctl(x, width = max(width, 0), indent = indent,
15+
exdent = indent + 2)
16+
}
17+
18+
19+
pillar___wrap = function (..., indent = 0, prefix = "", width)
20+
{
21+
x <- paste0(..., collapse = "")
22+
wrapped <- pillar___strwrap2(x, width - get_extent(prefix), indent)
23+
wrapped <- paste0(prefix, wrapped)
24+
wrapped <- gsub(NBSP, " ", wrapped)
25+
paste0(wrapped, collapse = "\n")
26+
}

0 commit comments

Comments
 (0)