same: Check whether objects are identical

Description Usage Arguments Details Value Examples

Description

Check whether objects are identical

Usage

1
same(..., objects = NULL, key = NULL)

Arguments

objects

List of objects to be compared

key

Function to apply to objects before comparison (see Details)

...

Any number of objects

Details

If the objects to be compared are referenced by separate variables, use the ... argument. If you have a list of objects, use the objects argument. You are free to use both the ... and objects arguments at the same time.

If key is NULL, objects are compared directly. If key is a function, it will be applied to the objects and the return values will be compared. This makes it possible to compare objects in terms of arbitrary attributes.

Value

Returns TRUE if all objects are identical, otherwise returns FALSE.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Do data frames d1, d2, and d3 have the same row names?
same(d1, d2, d3, key = rownames)
# Equivalent to:
same(objects = list(d1, d2, d3), key = rownames)
# Or:
same(d1, objects = list(d2, d3), key = rownames)

## End(Not run)

cbhelmholtz/metaboliteqc documentation built on May 13, 2019, 2:03 p.m.