Skip to content

Commit

Permalink
update for R 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Apr 30, 2019
1 parent 9cabf68 commit 50dbf21
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 102 deletions.
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
Package: ouch
Type: Package
Title: Ornstein-Uhlenbeck Models for Phylogenetic Comparative Hypotheses
Version: 2.13-1
Date: 2018-09-19
Version: 2.14-1
Date: 2019-04-30
Author: Aaron A. King <kingaa@umich.edu> and Marguerite A. Butler <mbutler@hawaii.edu>
Maintainer: Aaron A. King <kingaa@umich.edu>
Description: Fit and compare Ornstein-Uhlenbeck models for evolution along a phylogenetic tree.
Depends: R(>= 3.3), methods, stats, graphics, subplex
Depends: R(>= 3.6), methods, stats, graphics, subplex
Suggests: ape, geiger
URL: http://kingaa.github.io/ouch/
URL: https://kingaa.github.io/ouch/
License: GPL-3
LazyLoad: true
Collate: ouchtree.R ape2ouch.R glssoln.R rmvnorm.R brown.R hansen.R methods.R
paint.R plot.R
Collate: ouchtree.R ape2ouch.R glssoln.R rmvnorm.R brown.R hansen.R methods.R paint.R plot.R
49 changes: 31 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ INSTALL = install
PKG = $(shell perl -ne 'print $$1 if /Package:\s+((\w+[-\.]?)+)/;' DESCRIPTION)
VERSION = $(shell perl -ne 'print $$1 if /Version:\s+((\d+[-\.]?)+)/;' DESCRIPTION)
PKGVERS = $(PKG)_$(VERSION)
SOURCE=$(shell ls R/*R src/* man/*Rd data/* tests/*R)
SOURCE=$(shell ls R/*R src/*.c src/*.h data/*)
CSOURCE=$(shell ls src/*.c)
TESTS=$(shell ls tests/*R)

default:
@echo $(PKGVERS)
Expand All @@ -28,10 +30,15 @@ dist manual vignettes: export GS_QUALITY=ebook
dist manual vignettes: export R_HOME=$(shell $(REXE) RHOME)
check xcheck xxcheck: export FULL_TESTS=yes
xcheck tests: export R_PROFILE_USER=$(CURDIR)/.Rprofile
htmldocs vignettes data tests manual: export R_LIBS=$(CURDIR)/library
session htmldocs vignettes data tests manual: export R_LIBS=$(CURDIR)/library
xxcheck: export R_LIBS=$(CURDIR)/check

includes: inst/include/pomp.h inst/include/pomp_defines.h
includes:

headers:

inst/include/%.h: src/%.h
$(CP) $^ $@

htmldocs: inst/doc/*.html

Expand All @@ -48,11 +55,23 @@ inst/NEWS: inst/NEWS.Rd
www/NEWS.html: inst/NEWS.Rd
$(RCMD) Rdconv -t html inst/NEWS.Rd -o www/NEWS.html

session: install
exec $(REXE)

roxy: $(SOURCE)
## $(REXE) -e "pkgload::load_all(compile=FALSE); devtools::document(roclets=c('rd','collate','namespace'))"
$(REXE) -e "pkgbuild::compile_dll(); devtools::document(roclets=c('rd','collate','namespace'))"

dist: NEWS $(PKGVERS).tar.gz

$(PKGVERS).tar.gz: $(SOURCE)
$(PKGVERS).tar.gz: $(SOURCE) $(TESTS) includes headers
$(RCMD) build --force --no-manual --resave-data --compact-vignettes=both --md5 .

binary: dist
mkdir -p plib
$(RCMD) INSTALL --build --library=plib --preclean --clean $(PKGVERS).tar.gz
rm -rf plib

publish: dist manual news
$(RSCRIPT) -e 'drat::insertPackage("$(PKGVERS).tar.gz",repodir="../www",action="prune")'
-$(RSCRIPT) -e 'drat::insertPackage("$(PKGVERS).tgz",repodir="../www",action="prune")'
Expand Down Expand Up @@ -87,15 +106,15 @@ xxcheck: xcheck

ycheck: dist
mkdir -p check
$(RCMD_ALT) check --run-dontrun --as-cran --library=library -o check $(PKGVERS).tar.gz
$(RCMD_ALT) check --run-dontrun --run-donttest --as-cran --library=library -o check $(PKGVERS).tar.gz

manual: install $(PKG).pdf

$(PKG).pdf: $(SOURCE)
$(RCMD) Rd2pdf --no-preview --pdf --force -o $(PKG).pdf .
$(RSCRIPT) -e "tools::compactPDF(\"$(PKG).pdf\")";

tests: install tests/*.R
tests: install $(TESTS)
export R_LIBS
$(MAKE) -C tests

Expand All @@ -107,10 +126,6 @@ library/$(PKG): dist

remove:
-$(RCMD) REMOVE --library=library $(PKG)
rmdir library

inst/include/%.h: src/%.h
$(CP) $^ $@

inst/doc/*.html: install

Expand Down Expand Up @@ -138,20 +153,18 @@ inst/doc/*.html: install

%.html: %.Rmd
PATH=/usr/lib/rstudio/bin/pandoc:$$PATH \
Rscript --vanilla -e "rmarkdown::render(\"$*.Rmd\",output_format=\"html_document\")"
Rscript --vanilla -e "rmarkdown::render(\"$*.Rmd\")"

%.html: %.md
PATH=/usr/lib/rstudio/bin/pandoc:$$PATH \
Rscript --vanilla -e "rmarkdown::render(\"$*.md\",output_format=\"html_document\")"
Rscript --vanilla -e "rmarkdown::render(\"$*.md\")"

%.R: %.Rmd
Rscript --vanilla -e "knitr::purl(\"$*.Rmd\",output=\"$*.R\",documentation=2)"

clean:
$(RM) -r check library
$(RM) src/*.o src/*.so src/symbols.rds vignettes/Rplots.*
$(RM) -r check
$(RM) src/*.o src/*.so src/symbols.rds www/vignettes/Rplots.*
$(RM) -r inst/doc/figure inst/doc/cache
$(RM) $(PKGVERS).tar.gz $(PKGVERS).zip $(PKGVERS).tgz $(PKG).pdf

.SECONDARY:

$(RM) -r *-Ex.Rout *-Ex.timings *-Ex.pdf
$(RM) *.tar.gz $(PKGVERS).zip $(PKGVERS).tgz $(PKG).pdf
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

[![Build Status](https://travis-ci.org/kingaa/ouch.svg?branch=master)](https://travis-ci.org/kingaa/ouch)
[![Development Release](https://img.shields.io/github/release/kingaa/ouch.svg)](https://github.com/kingaa/ouch/)
[![CRAN Status](http://www.r-pkg.org/badges/version/ouch)](http://cran.r-project.org/package=ouch)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/ouch)](http://www.r-pkg.org/pkg/ouch)
[![CRAN Status](https://www.r-pkg.org/badges/version/ouch)](http://cran.r-project.org/package=ouch)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/ouch)](http://www.r-pkg.org/pkg/ouch)
[![codecov](https://codecov.io/gh/kingaa/ouch/branch/master/graph/badge.svg)](https://codecov.io/gh/kingaa/ouch)

Ornstein-Uhlenbeck models for Phylogenetic Comparative Hypotheses

See the [package website](http://kingaa.github.io/ouch/).
See the [package website](https://kingaa.github.io/ouch/).

#### Binary install

```
install.packages("ouch",repos="http://kingaa.github.io/")
install.packages("ouch",repos="https://kingaa.github.io/")
```

#### Source install
Expand All @@ -25,4 +25,4 @@ install_github("kingaa/ouch")

#### Package manual

[Download it here.](http://kingaa.github.io/manuals/ouch.pdf)
[Download it here.](https://kingaa.github.io/manuals/ouch.pdf)
25 changes: 16 additions & 9 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
_N_e_w_s _f_o_r _P_a_c_k_a_g_e '_o_u_c_h'

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_2-_1:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_4:

• Depends on R>=3.6. This change necessitated by modifications
to the default RNG with R version 3.6.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_3:

• Changes to the organization of the package.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_2:

• Upgrade the package license to GPL version 3.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_1-_1:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_1:

• Improvements to the underlying C code, which now registers
callable functions.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_0-_1:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1_0:

• In ‘glssoln’, when the Choleski decomposition fails, a
warning is issued and ‘NA’s are returned. In previous
versions, an error was thrown.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._8-_3:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._8:

• 'as(tree,"data.frame")' now returns a data-frame with
rownames identical to the node-names (tree@nodes).

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._8-_1:

• Functions that have been deprecated since 2.1-1 have been
removed. The argument 'alpha' that was deprecated in favor
of 'sqrt.alpha' in version 2.6-1 has been removed.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._7-_2:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._7:

• Fixed typo in the documentation of 'hansen'. Thanks to
Roland Sookias for bringing this to my attention.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._6-_1:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._6:

• In the 'hansen' function, the use of the argument 'alpha' was
confusing. This vector parameterizes the "selection" portion
Expand All @@ -50,7 +57,7 @@ _C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._6-_1:
'optim' if method='optim' and will otherwise generate an
error.

_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1-_1:
_C_h_a_n_g_e_s _i_n _o_u_c_h _v_e_r_s_i_o_n _2._1:

• Version 2 of ouch represents a major revision. ouch's
capabilities have been substantially extended.
Expand Down
29 changes: 18 additions & 11 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -1,38 +1,45 @@
\name{NEWS}
\title{News for Package 'ouch'}
\section{Changes in ouch version 2.12-1}{
\section{Changes in ouch version 2.14}{
\itemize{
\item Depends on R>=3.6.
This change necessitated by modifications to the default RNG with R version 3.6.
}
}
\section{Changes in ouch version 2.13}{
\itemize{
\item Changes to the organization of the package.
}
}
\section{Changes in ouch version 2.12}{
\itemize{
\item Upgrade the package license to GPL version 3.
}
}
\section{Changes in ouch version 2.11-1}{
\section{Changes in ouch version 2.11}{
\itemize{
\item Improvements to the underlying C code, which now registers callable functions.
}
}
\section{Changes in ouch version 2.10-1}{
\section{Changes in ouch version 2.10}{
\itemize{
\item In \code{glssoln}, when the Choleski decomposition fails, a warning is issued and \code{NA}s are returned.
In previous versions, an error was thrown.
}
}
\section{Changes in ouch version 2.8-3}{
\section{Changes in ouch version 2.8}{
\itemize{
\item 'as(tree,"data.frame")' now returns a data-frame with rownames identical to the node-names (tree@nodes).
}
}
\section{Changes in ouch version 2.8-1}{
\itemize{
\item Functions that have been deprecated since 2.1-1 have been removed.
The argument 'alpha' that was deprecated in favor of 'sqrt.alpha' in version 2.6-1 has been removed.
}
}
\section{Changes in ouch version 2.7-2}{
\section{Changes in ouch version 2.7}{
\itemize{
\item Fixed typo in the documentation of 'hansen'. Thanks to Roland Sookias for bringing this to my attention.
}
}
\section{Changes in ouch version 2.6-1}{
\section{Changes in ouch version 2.6}{
\itemize{
\item In the 'hansen' function, the use of the argument 'alpha' was confusing.
This vector parameterizes the "selection" portion of the OU model, which since version 2 has been assumed to be a positive-definite matrix (corresponding to stabilizing selection).
Expand All @@ -43,7 +50,7 @@
In some future release, use of 'alpha' as an argument to 'hansen' will no longer generate a warning but will instead be passed through to the control list for 'optim' if method='optim' and will otherwise generate an error.
}
}
\section{Changes in ouch version 2.1-1}{
\section{Changes in ouch version 2.1}{
\itemize{
\item Version 2 of ouch represents a major revision.
ouch's capabilities have been substantially extended.
Expand Down
2 changes: 1 addition & 1 deletion man/hansen.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ hansen(data, tree, regimes, sqrt.alpha, sigma,
}
\examples{
\dontrun{
if (library(geiger)) {
if (library(geiger,logical.return=TRUE)) {

### an example data set (Darwin's finches)
data(geospiza)
Expand Down
18 changes: 18 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
REXE = R
RCMD = $(REXE) CMD

SAVED = $(shell ls *.Rout.save *.Rout)

default: $(SAVED) clean

%.Rout.save: %.R
$(REXE) < $*.R > $*.Rout.save 2>&1

%.Rout: %.R
$(REXE) < $*.R > $*.Rout 2>&1

clean:
$(RM) *.c *.o *.so

fresh: clean
$(RM) *.png
10 changes: 6 additions & 4 deletions tests/boot.Rout.save
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Expand Down Expand Up @@ -40,7 +42,7 @@ Loading required package: subplex
> b5 <- sapply(simdat,function(x)summary(update(h5,data=x))$aic.c)
> toc <- Sys.time()
> print(toc-tic)
Time difference of 8.847037 secs
Time difference of 6.676345 secs
> cat("approximate 95% AIC.c cutoff",signif(quantile(b1-b5,0.95),digits=3),"\n")
approximate 95% AIC.c cutoff 2.58
>
Expand Down
9 changes: 5 additions & 4 deletions tests/exacttree.Rout.save
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Expand Down
Loading

0 comments on commit 50dbf21

Please sign in to comment.