Skip to contents

This function checks if a variable is already initialized in the variable list.

Usage

already_init_variable(list_var, new_var_name)

Arguments

list_var

A list object representing the variable list.

new_var_name

A character string specifying the name of the new variable.

Value

TRUE if the variable is already initialized, FALSE otherwise.

Examples

my_list <- list(var1 = 1, var2 = 2, var3 = 3)
already_initialized <- already_init_variable(list_var = my_list, new_var_name = "myVariable")