Skip to content

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeneditos committed Dec 8, 2018
1 parent 3366939 commit 88ab07c
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 19 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: infix
Type: Package
Title: Basic infix binary operators
Title: Basic Infix Binary Operators
Version: 0.1.0
Authors@R: person("Ernest", "Benedito", role = c("aut", "cre"), email = "ebeneditos@gmail.com")
Description: Contains a number of infix binary operators that may be useful in day to day practices.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# v0.1.0

- First release on CRAN.
2 changes: 1 addition & 1 deletion R/infix-package.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @name infix
#' @docType package
#' @title Basic infix binary operators
#' @title Basic Infix Binary Operators
#' @description Contains a number of infix binary operators that may be useful
#' in day to day practices.
#' @section Operators: \describe{
Expand Down
9 changes: 5 additions & 4 deletions R/operators.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
#' @title Common Infix Operators
#'
#' @section Infix Operators: \describe{
#' \item{\code{\link{paste}}}{Concatenate Strings (see \code{?"\%+\%"}).}
#' \item{\code{\link{paste0}}}{Concatenate Strings (see \code{?"\%+\%"}).}
#' \item{\code{\link{file.path}}}{Construct Path to File (see \code{?"\%//\%"}).}
#' \item{\code{\link{unmatch}}}{Value (Non) Matching (see \code{?"\%!in\%"}).}
#' \item{\code{\link{nomatch}}}{Value (non) Matching (see \code{?"\%!in\%"}).}
#' \item{\code{\link{nil}}}{Default value for \code{NULL} (see \code{?"\%||\%"}).}
#' }
NULL

#' @name paste
#' @name paste0
#' @aliases paste
#' @aliases %+%
#'
#' @title Concatenate Strings
Expand All @@ -37,7 +38,7 @@ NULL
#' @export
`%//%` <- function(x, y) file.path(x, y)

#' @name unmatch
#' @name nomatch
#' @aliases %!in%
#'
#' @title Value (non) Matching
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# infix

> Basic infix binary operators
> Basic Infix Binary Operators
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![CRAN](http://www.r-pkg.org/badges/version/infix)](https://cran.r-project.org/package=infix)
[![Travis CI Status](https://travis-ci.org/ebeneditos/infix.svg?branch=master)](https://travis-ci.org/ebeneditos/infix)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/ebeneditos/infix?branch=master&svg=true)](https://ci.appveyor.com/project/ebeneditos/infix)
[![Codecov](https://codecov.io/gh/ebeneditos/infix/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/ebeneditos/infix)
Expand All @@ -11,7 +11,13 @@ Contains a number of infix binary operators that may be useful in day to day pra

## Installation

You can install the development version from GitHub:
You can install `infix` from CRAN:

``` r
install.packages("infix")
```

Or the development version from GitHub:

``` r
# install.packages("devtools")
Expand Down Expand Up @@ -40,7 +46,7 @@ print(foo) # "foo bar"
# file.path (%//%)
"home" %//% "dir" # returns "home/dir"

# unmatch (%!in%)
# no match (%!in%)
4 %!in% 1:3 # returns TRUE

# nil (%||%)
Expand Down
2 changes: 1 addition & 1 deletion man/infix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/unmatch.Rd → man/nomatch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/operators.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/paste.Rd → man/paste0.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-operators.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

context("operators")

test_that("paste", {
test_that("paste0", {

expect_equal("01" %+% "jan" %+% "1970", "01jan1970")

Expand All @@ -13,7 +13,7 @@ test_that("file.path", {

})

test_that("unmatch", {
test_that("nomatch", {

expect_true(4 %!in% 1:3)

Expand Down

0 comments on commit 88ab07c

Please sign in to comment.