Skip to content

Commit

Permalink
Merge da6961a into 473e202
Browse files Browse the repository at this point in the history
  • Loading branch information
mailund committed Mar 22, 2018
2 parents 473e202 + da6961a commit e10ccea
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 528 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
^SUPPORT\.md$
^CODE_OF_CONDUCT\.md$
^.imdone$
^revdep$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: pmatch
Title: Pattern Matching
Version: 0.1.2.9004
Version: 0.1.3
Author: Thomas Mailund <mailund@birc.au.dk>
Maintainer: Thomas Mailund <mailund@birc.au.dk>
Description: Implements type constructions and pattern matching.
Expand All @@ -13,7 +13,6 @@ ByteCompile: true
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.0.1
VignetteBuilder: knitr
Language: en-GB
Depends:
R (>= 3.2)
Expand All @@ -33,6 +32,7 @@ Suggests:
knitr,
rmarkdown,
magrittr,
microbenchmark,
tailr (>= 0.1.0)
URL: https://github.com/mailund/pmatch
BugReports: https://github.com/mailund/pmatch/issues
Binary file removed README-unnamed-chunk-21-1.png
Binary file not shown.
Binary file removed README-unnamed-chunk-23-1.png
Binary file not shown.
6 changes: 2 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ suppressPackageStartupMessages(library(pmatch, quietly = TRUE))
[![lifecycle](http://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![Project Status: Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-green.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.2.9004-green.svg?style=flat-square)](commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.3-green.svg?style=flat-square)](commits/master)

[![Travis-CI Build Status](http://travis-ci.org/mailund/pmatch.svg?branch=master)](https://travis-ci.org/mailund/pmatch)
[![AppVeyor Build Status](http://ci.appveyor.com/api/projects/status/wvyqe7bfp4a2rm77?svg=true)](https://ci.appveyor.com/project/mailund/pmatch)
Expand Down Expand Up @@ -249,11 +249,9 @@ is_leaf_tr_bc(T(L(1),L(2)))
Transformation has the added benefit of slightly speeding up the function. And, of course, being able to byte-compile can add a bit more to the performance.

```{r}
bm <- microbenchmark::microbenchmark(
microbenchmark::microbenchmark(
is_leaf(L(1)), is_leaf_tr(L(1)), is_leaf_tr_bc(L(1))
)
bm
boxplot(bm)
```


Expand Down
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Project Status:
Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Last-changedate](https://img.shields.io/badge/last%20change-2018--03--22-green.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.2.9004-green.svg?style=flat-square)](commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.3-green.svg?style=flat-square)](commits/master)

[![Travis-CI Build
Status](http://travis-ci.org/mailund/pmatch.svg?branch=master)](https://travis-ci.org/mailund/pmatch)
Expand Down Expand Up @@ -298,7 +298,7 @@ compiler::cmpfun(other_is_leaf)
#> L(x) ~ TRUE,
#> otherwise ~ FALSE)
#> }
#> <bytecode: 0x7fe95ecb8320>
#> <bytecode: 0x7fe39b06d708>
```

The `pmatch` package makes no distinction betwen the `~` or the `->`
Expand Down Expand Up @@ -336,24 +336,20 @@ function. And, of course, being able to byte-compile can add a bit more
to the performance.

``` r
bm <- microbenchmark::microbenchmark(
microbenchmark::microbenchmark(
is_leaf(L(1)), is_leaf_tr(L(1)), is_leaf_tr_bc(L(1))
)
bm
#> Unit: microseconds
#> expr min lq mean median uq max
#> is_leaf(L(1)) 443.514 486.836 652.8813 536.9005 786.4130 2125.139
#> is_leaf_tr(L(1)) 300.753 346.337 548.5831 410.8325 585.3085 5006.925
#> is_leaf_tr_bc(L(1)) 299.065 340.842 440.1834 383.1630 534.1485 887.267
#> expr min lq mean median uq max
#> is_leaf(L(1)) 394.504 421.8150 547.9162 454.731 614.2365 1389.600
#> is_leaf_tr(L(1)) 273.133 303.8825 473.8971 326.271 547.3810 3691.823
#> is_leaf_tr_bc(L(1)) 274.024 297.2015 392.1318 314.548 354.1250 2367.804
#> neval
#> 100
#> 100
#> 100
boxplot(bm)
```

![](README-unnamed-chunk-23-1.png)<!-- -->

For more examples, see below.

## Installation
Expand Down
28 changes: 20 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@

# Update to 0.1.2
# Update to 0.1.3

This version adds support for tail-recursion optimisation via tailr.
* Formula syntax in cases as an alternative:

cases(f(x), foo ~ bar, baz ~ qux).

This is easier to get to static code checkes such as lintr and through the
byte compiler that can complain about "assignments" to literals.

* bind[x,y,z] <- 1:3 syntax for binding variables.

* transformation function transform_cases_function for modifying a function
instead of calling `cases`.

## Test environments
* local OS X install, R 3.4.3
* ubuntu 14.04 (on travis-ci), R 3.4.3
* local OS X install, R 3.4.4
* ubuntu 14.04 (on travis-ci), R 3.4.4
* win-builder (devel and release)
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit via RHub
* Ubuntu Linux 16.04 LTS, R-release, GCC via RHub
* Fedora Linux, R-devel, clang, gfortran via RHub
* RHub:
- Windows Server 2008 R2 SP1, R-devel, 32/64 bit
-
RHub gets warnings from pandoc when building README.md
on Windows but otherwise checks.

## R CMD check results

0 errors | 0 warnings | 0 notes

## Downstream dependencies

There are currently no downstream dependencies for this package.
* Package `tailr` checks without problems with this release.
Binary file added revdep/checks.rds
Binary file not shown.
2 changes: 0 additions & 2 deletions vignettes/.gitignore

This file was deleted.

Binary file removed vignettes/RBT-transformations.png
Binary file not shown.
Binary file removed vignettes/README-unnamed-chunk-23-1.png
Binary file not shown.

0 comments on commit e10ccea

Please sign in to comment.