Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

eql

Check on equality, including NA==NA and NaN==NaN.


Description

eql checks two vectors on equality; two NA's and two NaN's are compared as equal.

Usage

eql(x, y)

Arguments

x, y

vectors of equal length.

Value

A vector of logicals indicating the result of the element by element comparison.The elements of shorter vectors are recycled as necessary.

Author(s)

Christian W. Hoffmann <christian@echoffmann.ch>,
idea by Peter Dalgaard, p.dalgaard@biostat.ku.dk

Examples

eql(c(1,2,3),c(1,3)) #>  TRUE FALSE FALSE
  eql(c(1,2,3),c(1,2)) #>  TRUE  TRUE FALSE
  eql(c(NA,NaN,2,NA,3),c(NA,NaN,1,2,3)) #> TRUE TRUE FALSE FALSE TRUE

cwhmisc

Miscellaneous Functions for Math, Plotting, Printing, Statistics, Strings, and Tools

v6.6
GPL (>= 2)
Authors
Christian W. Hoffmann
Initial release
2018-08-24, 10:40:10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.