Factorize all categorical columns

df_char_to_factor(df)

Arguments

df

A sample x condition data frame

Value

A sample x condition data frame

Examples

df_char_to_factor(matrix(seq_len(12)))
#>       [,1]
#>  [1,]    1
#>  [2,]    2
#>  [3,]    3
#>  [4,]    4
#>  [5,]    5
#>  [6,]    6
#>  [7,]    7
#>  [8,]    8
#>  [9,]    9
#> [10,]   10
#> [11,]   11
#> [12,]   12