# NOT RUN {
ht <- huxtable(a = 10^(3:6) + (5 * 10^(-2:-5)), b = 10^(3:6) + (5* 10^(-2:-5)))
number_format(ht)[1,] <- 2
number_format(ht)[2,] <- '%5.2f'
number_format(ht)[3,] <- list(function(x) prettyNum(x, big.mark = ','))
number_format(ht)[4,] <- list(function(x) if(x>0) '+' else '-')
ht
print_screen(ht)
ht_bands <- huxtable("10000 Maniacs")
ht_bands # probably not what you want
number_format(ht_bands) <- NA
ht_bands
ht <- huxtable(a = 1:3, b = 3:1)
set_number_format(ht, 2)
set_number_format(ht, 1:2, 1, 2)
set_number_format(ht, 1:2, 1:2, c(2, 3), byrow = TRUE)
set_number_format(ht, where(ht == 1), 2)
# }
Run the code above in your browser using DataLab