process_factor_data: Treat factors as numeric values

View source: R/plot.R

process_factor_dataR Documentation

Treat factors as numeric values

Description

Factors are given a numeric value above the highest numeric value in the data. The value of the different levels are sorted by factor and then level.

Usage

process_factor_data(dt, factor_cols)

Arguments

dt

data.table to plot

factor_cols

Columns that are factors or character

Value

A list of a lookup table with each factor and level and its numeric value, a data.table very similar to the input data, but now with numeric values for factors, and the maximum feature value.


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.