Learn R Programming

ggeffects (version 1.7.1)

get_title: Get titles and labels from data

Description

Get variable and value labels from ggeffects-objects. predict_response() saves information on variable names and value labels as additional attributes in the returned data frame. This is especially helpful for labelled data (see sjlabelled), since these labels can be used to set axis labels and titles.

Usage

get_title(x, case = NULL)

get_x_title(x, case = NULL)

get_y_title(x, case = NULL)

get_legend_title(x, case = NULL)

get_legend_labels(x, case = NULL)

get_x_labels(x, case = NULL)

get_complete_df(x, case = NULL)

Value

The titles or labels as character string, or NULL, if variables had no labels; get_complete_df() returns the input list x

as single data frame, where the grouping variable indicates the predicted values for each term.

Arguments

x

An object of class ggeffects, as returned by any ggeffects-function; for get_complete_df(), must be a list of ggeffects-objects.

case

Desired target case. Labels will automatically converted into the specified character case. See ?sjlabelled::convert_case for more details on this argument.