Giter Club home page Giter Club logo

assertive.numbers's Introduction

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Is the package on CRAN? SemaphoreCI Build Status AppVeyor Build Status

assertive.numbers

A set of predicates and assertions for checking the properties of numbers. Most of the documentation is on the assertive page. End-users will usually want to use assertive directly.

Installation

To install the stable version, type:

install.packages("assertive.numbers")

To install the development version, you first need the devtools package.

install.packages("devtools")

Then you can install the assertive.numbers package using

library(devtools)
install_bitbucket("richierocks/assertive.numbers")

Predicates

is_even and is_odd check for even or odd numbers. is_divisible_by generalizes the concept.

is_finite, is_infinite, is_negative_infinity, and is_positive_infinity check for infiniteness.

is_nan and is_not_nan check for NaN (or not).

is_in_range checks for numbers in a range. is_in_closed_range, is_in_open_range, is_in_left_open_range, is_in_right_open_range, is_negative, is_non_negative, is_positive, is_non_positive, is_percentage, and is_proportion provide more specialized alternatives.

is_imaginary and is_real check for imaginary or real numbers.

is_whole_number check for whole numbers.

is_equal_to, is_not_equal_to, is_greater_than, is_greater_than_or_equal_to, is_less_than, and is_less_than_or_equal_to check relational operators.

Assertions

Predicates all return a vector and have two corresponding assertions. For example, is_even has assert_all_are_even and assert_any_are_even.

assertive.numbers's People

Contributors

richierocks avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.