format_hits | R Documentation |
Format list of hit vectors into summary counts
format_hits(hits, style = c("text", "integer", "vector"), ...)
hits |
|
style |
|
... |
additional arguments are ignored. |
This function is used by sestats_to_df()
,
to summarize hits for each contrast into one of these formats:
string summary of statistical hits with "hits,up,down"
when style="text"
, for example: "623 hits (267 up, 379 down)"
integer count of statistical hits when style="integer"
,
for example: 623
.
vector
of integer counts for c("hits", "up", "down")
,
for example: c(hits=623, up=267, down=379)
.
The function may be useful outside of sestats_to_df()
so it
is exported as a convenience function.
the same data type as input, where the hit vector is replaced with a single value summarizing the hits. The data types have three expected options:
array
: when used with hit_array
data from se_contrast_stats()
list
: when used on a particular subset of hit_array
data
numeric
: when used with a single contrast
Other jamses stats:
ebayes2dfs()
,
handle_na_values()
,
hit_array_to_list()
,
process_sestats_to_hitim()
,
run_limma_replicate()
,
save_sestats()
,
se_contrast_stats()
,
sestats_to_dfs()
,
sestats_to_df()
,
voom_jam()
set.seed(123)
hitlist <- list(
`groupA-groupB`=sample(c(-1, 1), size=25, replace=TRUE),
`groupA-groupC`=sample(c(-1, 1), size=50, replace=TRUE))
format_hits(hitlist, style="text")
format_hits(hitlist, style="integer")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.