Learn R Programming

qol (version 1.2.0)

get_integer_length: Get Integer Length

Description

Get the number of digits of an integer variable.

Usage

get_integer_length(variable)

Value

Returns a vector with the number of digits places.

Arguments

variable

The integer variable from which to get the length.

Examples

Run this code
# Example data frame
my_data <- dummy_data(100)

my_data[["age_length"]] <- get_integer_length(my_data[["age"]])

Run the code above in your browser using DataLab