Fit and plot a rpart model for exploratory purposes using rpart and rpart.plot libraries. Idea from explore library.
tree_var(
df,
target,
max = 3,
min = 20,
cp = 0,
size = 0.7,
ohse = TRUE,
plot = TRUE,
...
)
Data frame
Variable
Integer. Maximal depth of the tree
Integer. The minimum number of observations that must exist in a node in order for a split to be attempted
Numeric. Complexity parameter
Numeric. Textsize of plot
Boolean. Auto generate One Hot Smart Encoding?
Boolean. Return a plot? If not, rpart
object
rpart.plot custom parameters
When plot=TRUE
returns plot; when plot=FALSE
returns rpart
fitted model.
Other Exploratory:
corr_cross()
,
corr_var()
,
crosstab()
,
df_str()
,
distr()
,
freqs_df()
,
freqs_list()
,
freqs_plot()
,
freqs()
,
lasso_vars()
,
missingness()
,
plot_cats()
,
plot_df()
,
plot_nums()
,
trendsRelated()
Other Visualization:
distr()
,
freqs_df()
,
freqs_list()
,
freqs_plot()
,
freqs()
,
gg_bars()
,
gg_pie()
,
noPlot()
,
plot_chord()
,
plot_survey()
,
plot_timeline()
,
theme_lares()