Learn R Programming

envnames (version 0.4.1)

is_string: Check whether an object is a string.

Description

WARNING: This function fails when the value of x is "x"!! (i.e. it returns TRUE even when object 'x' is NOT a string per se --i.e. it was not passed as "x")

Usage

is_string(x)

Arguments

x

object to check.

Value

boolean indicating whether the object is a string.

Details

The result of this function is different from is.character(x) since this function returns TRUE for an array of character values!