group_by_level | R Documentation |
group by level
group_by_level(x, ...)
## S3 method for class 'character'
group_by_level(x, ...)
## S3 method for class 'factor'
group_by_level(x, ...)
## S3 method for class 'data.table'
group_by_level(x, var, idvar, ...)
x |
named logical/character/factor |
... |
S3 dispatch |
var |
string |
idvar |
string |
unnamed character
t1 <- c( KLF5 = 'up', F11 = 'up', RIG = 'flat', ABT1 = 'down')
dt <- data.table( gene = c( 'KL5', 'F11', 'RIG', 'ABT1' ),
t1 = c( 'up', 'up', 'flat', 'down' ) )
group_by_level(t1) # character
group_by_level(factor(t1)) # factor
group_by_level(dt, 't1', 'gene') # data.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.