Hi,
I know there's possibly a way of fully doing this with the Tidyverse, but sometimes I just like to combine base R functions with Tidyverse ones to get a clean and easy result 
library(tidyverse)
# A sample of my data
data <- tribble (
~value, ~expr_level,
"BCR", 0.564,
"BCR", 0.841,
"E2A", 0.214,
"E2A", 0.147,
"MLL", 0.451,
"MLL", 0.411
)
#Map over all unique values
result = map_df(unique(data$value), function(gene){
data.frame(
gene = gene,
tstatistic = t.test(
data %>% filter(value == gene) %>% pull(expr_level),
data %>% filter(value != gene) %>% pull(expr_level)
)$statistic %>% as.numeric()
)
})
result
#> gene tstatistic
#> 1 BCR 2.52624282
#> 2 E2A -3.76428272
#> 3 MLL -0.06451184
Created on 2021-05-01 by the reprex package (v2.0.0)
I think this should be what you wanted right?
Hope this helps,
PJ