https://github.com/hadley/dplyr
Tip revision: 2b488e0d0d23282e625570989a825291651b5ece authored by Davis Vaughan on 29 April 2020, 14:21:31 UTC
Simplify `dplyr_reconstruct()` (#5160)
Simplify `dplyr_reconstruct()` (#5160)
Tip revision: 2b488e0
near.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/near.R
\name{near}
\alias{near}
\title{Compare two numeric vectors}
\usage{
near(x, y, tol = .Machine$double.eps^0.5)
}
\arguments{
\item{x, y}{Numeric vectors to compare}
\item{tol}{Tolerance of comparison.}
}
\description{
This is a safe way of comparing if two vectors of floating point numbers
are (pairwise) equal. This is safer than using \code{==}, because it has
a built in tolerance
}
\examples{
sqrt(2) ^ 2 == 2
near(sqrt(2) ^ 2, 2)
}