commontail: Common Strings in Tail

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Takes a list of character vectors and returns the longest vector of strings that is common to the ends of all of the components in the list.

Usage

1

Arguments

x

list of character vectors.

Details

This is useful to get the class that is common to a number of objects.

Value

a character vector containing the common elements of the tails of all the components in x.
The result is NULL if there are no common elements.

Author(s)

Nick Efthymiou

References

S Poetry, Patrick J. Burns

See Also

inherits, intersect

Examples

1
2
commontail(list(c("subA", "cls1"), c("subB", "subA", "cls1")))
commontail(list(c("subA", "cls2"), c("subB", "subA", "cls1")))

ClausDethlefsen/mathgraph documentation built on May 25, 2019, 1:36 p.m.