Learn R Programming

rindex (version 0.12.1)

strncmp: String comparison <e1> la C

Description

Functiions to compare two vectors of strings like the standard C functions do.

Usage

strcmp(a, b)
strncmp(a, b, n)

Arguments

a

character vector

b

character vector

n

number of characters to compare

Value

1 if a>b, -1 if a<b, 0 if a==b.

See Also

substr, Comparison