get_first_element_class: Retrieve the class of the first element of a vector

View source: R/create_dataset_summary_table.R

get_first_element_classR Documentation

Retrieve the class of the first element of a vector

Description

Retrieve the class of the first element of a vector

Usage

get_first_element_class(input_vector)

Arguments

input_vector

A vector whose first element's class is to be retrieved.

Value

The class of the first element of the input vector.

Examples

# Get the class of the first element in a numeric vector
get_first_element_class(c(1, 2, 3)) # Returns "numeric"

# Get the class of the first element in a character vector
get_first_element_class(c("apple", "banana", "cherry")) # Returns "character"

vvauditor documentation built on May 29, 2024, 12:20 p.m.