Learn R Programming

sdbuildR (version 2.0.0)

length_IM: Length of vector or string

Description

Equivalent of .Length() in Insight Maker, which returns the number of elements when performed on a vector, but returns the number of characters when performed on a string

Usage

length_IM(x)

Value

The number of elements in x if x is a vector; the number of characters in x if x is a string

Arguments

x

A vector or a string

Examples

Run this code
length_IM(c("a", "b", "c")) # 3
length_IM("abcdef") # 6

Run the code above in your browser using DataLab