diff --git a/.Rbuildignore b/.Rbuildignore index 1e810ab..ffccbac 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,11 +1,12 @@ -examples -repo -revdep -scripts -tools -wiki -www -yaml +examples/ +rchk/ +repo/ +revdep/ +scripts/ +tools/ +wiki/ +www/ +yaml/ tests/Makefile tests/(.+?)\.png$ tests/(.+?)\.pdf$ @@ -19,6 +20,7 @@ LICENSE\.md$ README\.(.?)$ CRAN\.md$ TODO\.md$ +BUILD\.md$ ^\.gitignore$ \.github ^\.travis\.yml$ diff --git a/.github/workflows/binary-build.yml b/.github/workflows/binary-build.yml index 4824803..a068221 100644 --- a/.github/workflows/binary-build.yml +++ b/.github/workflows/binary-build.yml @@ -3,7 +3,7 @@ on: push: tags: - - '*.*.*.*' + - '*.*-*' workflow_dispatch: name: binary-build diff --git a/.gitignore b/.gitignore index 4015062..6df9ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,13 +18,14 @@ *.gcda *.gcno *.pdf +*.sif /scripts -lib -library -check +lib/ +library/ +check/ repo -wiki -www +wiki/ +www/ tmp covr.html covr.rds diff --git a/DESCRIPTION b/DESCRIPTION index 28706fa..7c78a9d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ouch Type: Package Title: Ornstein-Uhlenbeck Models for Phylogenetic Comparative Hypotheses -Version: 2.19-1 -Date: 2024-02-14 +Version: 2.19-2 +Date: 2024-04-01 Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa@umich.edu",comment=c(ORCID="0000-0001-6159-3207")), person(given=c("Marguerite","A."),family="Butler",role=c("ctb"))) Maintainer: Aaron A. King diff --git a/rchk/Makefile b/rchk/Makefile new file mode 100644 index 0000000..b15b5d3 --- /dev/null +++ b/rchk/Makefile @@ -0,0 +1,14 @@ +TARBALL = $(wildcard *.tar.gz) + +rchk: rchk.sif + singularity run rchk.sif $(PWD)/$(TARBALL) | tee rchk.out + +rchk.sif: + singularity pull rchk.sif shub://kalibera/rchk:def + +clean: + $(RM) $(TARBALL) + $(RM) -r build lib libsonly + +fresh: clean + $(RM) rchk.sif diff --git a/rchk/rchk.out b/rchk/rchk.out new file mode 100644 index 0000000..d04b784 --- /dev/null +++ b/rchk/rchk.out @@ -0,0 +1,27 @@ + +Note: Setting PKG_ROOT variable to the current directory. +Output will be in ./lib, ./build and ./libsonly subdirectories. +If it is not, maybe your local singularity configuration does +not allow singularity container to access your current directory; +it may help to try with PKG_ROOT=/tmp or check the configurarion. + +source("/opt/rchk/scripts/utils.r"); install_package_libs("/home/kingaa/ouch/ouch_2.19-2.tar.gz") +make[2]: Entering directory '/home/kingaa/ouch/rchk/build/FGnwTni7/ouch/src' +/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c covar-matrix.c -o covar-matrix.o +/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c init.c -o init.o +/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c weight-matrix.c -o weight-matrix.o +/usr/local/bin/wllvm -shared -L/usr/local/lib -o ouch.so covar-matrix.o init.o weight-matrix.o +make[2]: Leaving directory '/home/kingaa/ouch/rchk/build/FGnwTni7/ouch/src' +Installed libraries of package ouch +[1] "/home/kingaa/ouch/rchk/libsonly/ouch/libs/ouch.so" + +ERROR: too many states (abstraction error?) in function strptime_internal +Analyzed 7 functions, traversed 133 states. +Library name (usually package name): ouch +Initialization function: R_init_ouch +Functions: 2 +Checked call to R_registerRoutines: 1 + +Rchk version: 3d653b7c8f92dac912532856b55f44d2986c6553 +R version: 79896/R Under development (unstable) (2021-01-28 r79896) +LLVM version: 10.0.0 diff --git a/rules.mk b/rules.mk index 1820131..f5591f1 100644 --- a/rules.mk +++ b/rules.mk @@ -22,9 +22,8 @@ INSTDOCS = $(sort $(wildcard inst/doc/*)) SESSION_PKGS = datasets,utils,grDevices,graphics,stats,methods,tidyverse,$(PKG) .PHONY: .check check clean covr debug default fresh \ -htmlhelp manual publish qcheck qqcheck \ -revdeps rhub rsession session www win wind xcheck \ -xcovr vcheck ycheck +htmlhelp manual publish qcheck qqcheck rchk revdeps \ +rhub rsession session www win wind xcheck xcovr vcheck ycheck .dist manual www: export R_QPDF=qpdf .headers: export LC_COLLATE=C @@ -41,6 +40,9 @@ rsession: RSESSION = R default: .roxy .NEWS .instdocs .source .includes .headers @echo $(PKGVERS) +version: + @echo $(PKGVERS) + roxy: .roxy dist: .dist @@ -65,9 +67,9 @@ INSTALLCMD = devtools::install(args=c("--preclean","--html","--library=library") check xcheck ycheck qcheck qqcheck: .check -vcheck: check/$(PKG).Rcheck/$(PKG)-Ex.R +vcheck: check $(REXE) -d "valgrind -s --tool=memcheck --track-origins=yes --leak-check=full"\ - < $^ 2>&1 | tee $(PKG)-Ex.Rout + < check/$(PKG).Rcheck/$(PKG)-Ex.R 2>&1 | tee $(PKG)-Ex.Rout NEWS: .NEWS @@ -126,6 +128,12 @@ www: install session debug rsession: .session +rchk: .rchk + +.rchk: .dist + $(CP) $(TARBALL) rchk + make -C rchk + revdeps: .dist mkdir -p revdep $(CP) $(TARBALL) revdep @@ -142,11 +150,14 @@ rhub: covr: covr.rds covr.rds: DESCRIPTION - $(REXE) -e 'library(covr); package_coverage(type="all") -> cov; report(cov,file="covr.html",browse=TRUE); saveRDS(cov,file="covr.rds")' + $(REXE) -e 'library(covr); package_coverage(type="all") -> cov; saveRDS(cov,file="covr.rds")' xcovr: covr $(REXE) -e 'library(covr); readRDS("covr.rds") -> cov; codecov(coverage=cov,quiet=FALSE)' +vcovr: covr + $(REXE) -e 'library(covr); readRDS("covr.rds") -> cov; report(cov,file="covr.html",browse=TRUE)' + win: dist curl -T $(TARBALL) ftp://win-builder.r-project.org/R-release/ @@ -211,6 +222,7 @@ clean: $(MAKE) -C inst/doc clean $(MAKE) -C tests clean $(MAKE) -C revdep clean + $(MAKE) -C rchk clean $(RM) .dist fresh: clean diff --git a/tests/ape2ouch.Rout b/tests/ape2ouch.Rout index f831c0a..e98560e 100644 --- a/tests/ape2ouch.Rout +++ b/tests/ape2ouch.Rout @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/bapst.Rout.save b/tests/bapst.Rout.save index 31abc14..236bd9f 100644 --- a/tests/bapst.Rout.save +++ b/tests/bapst.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -23,6 +23,6 @@ Type 'q()' to quit R. > tr <- with(x,ouchtree(nodes=node,ancestors=ancestor,times=time,labels=species)) > toc <- Sys.time() > print(toc-tic) -Time difference of 0.005596876 secs +Time difference of 0.003452539 secs > plot(tr) > diff --git a/tests/bergmann.Rout.save b/tests/bergmann.Rout.save index 0052045..38dfc32 100644 --- a/tests/bergmann.Rout.save +++ b/tests/bergmann.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/boot.Rout.save b/tests/boot.Rout.save index 25f2670..82e8dd5 100644 --- a/tests/boot.Rout.save +++ b/tests/boot.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -52,7 +52,7 @@ btstrp> b5 <- sapply(simdat,function(x)summary(update(h5,data=x))$aic.c) btstrp> toc <- Sys.time() btstrp> print(toc-tic) -Time difference of 13.27121 secs +Time difference of 13.49985 secs btstrp> cat("approximate 95% AIC.c cutoff",signif(quantile(b1-b5,0.95),digits=3),"\n") approximate 95% AIC.c cutoff 2.58 diff --git a/tests/brown.Rout.save b/tests/brown.Rout.save index 5b49c2f..a9dab1a 100644 --- a/tests/brown.Rout.save +++ b/tests/brown.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/exacttree.Rout.save b/tests/exacttree.Rout.save index a97671d..f72510e 100644 --- a/tests/exacttree.Rout.save +++ b/tests/exacttree.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/glssoln.Rout.save b/tests/glssoln.Rout.save index 8506c6e..65b1559 100644 --- a/tests/glssoln.Rout.save +++ b/tests/glssoln.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/hansen.Rout.save b/tests/hansen.Rout.save index 1c33479..f30a6a7 100644 --- a/tests/hansen.Rout.save +++ b/tests/hansen.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/ouchtree.Rout.save b/tests/ouchtree.Rout.save index 0535a18..2bc5754 100644 --- a/tests/ouchtree.Rout.save +++ b/tests/ouchtree.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/paint.Rout.save b/tests/paint.Rout.save index 8610a51..217df1d 100644 --- a/tests/paint.Rout.save +++ b/tests/paint.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/plot.Rout.save b/tests/plot.Rout.save index 21647f9..6f886f4 100644 --- a/tests/plot.Rout.save +++ b/tests/plot.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/tests/simtree.Rout.save b/tests/simtree.Rout.save index 7e67a6f..da61a26 100644 --- a/tests/simtree.Rout.save +++ b/tests/simtree.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -92,7 +92,7 @@ Type 'q()' to quit R. > tree <- with(x,ouchtree(node,ancestor,time)) > toc <- Sys.time() > print(toc-tic) -Time difference of 2.687218 secs +Time difference of 3.591979 secs > > bfit <- brown(data=x[c("A","B")],tree) > print(summary(bfit)) @@ -135,7 +135,7 @@ $dof > hfit <- hansen(data=x[c("A","B")],tree=tree,regimes=x['reg'],sqrt.alpha=a,sigma=s,fit=F) > toc <- Sys.time() > print(toc-tic) -Time difference of 6.222583 secs +Time difference of 5.536899 secs > print(summary(hfit)) $call hansen(data = x[c("A", "B")], tree = tree, regimes = x["reg"], @@ -203,7 +203,7 @@ $dof > tree <- with(x,ouchtree(node,ancestor,time)) > toc <- Sys.time() > print(toc-tic) -Time difference of 1.404474 secs +Time difference of 1.458032 secs > > bfit <- brown(data=x[c("A","B")],tree) > print(summary(bfit)) @@ -283,7 +283,7 @@ $dof > hfit <- hansen(data=x[c("A","B")],tree=tree,regimes=x['reg'],sqrt.alpha=a,sigma=s,fit=F) > toc <- Sys.time() > print(toc-tic) -Time difference of 3.714571 secs +Time difference of 3.757848 secs > print(summary(hfit)) $call hansen(data = x[c("A", "B")], tree = tree, regimes = x["reg"], diff --git a/tests/snizard.Rout.save b/tests/snizard.Rout.save index cc3d070..3c90ee1 100644 --- a/tests/snizard.Rout.save +++ b/tests/snizard.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -58,8 +58,8 @@ Type 'q()' to quit R. + + } Loading required package: ape -Time difference of 0.2880907 secs -Time difference of 5.005338 secs +Time difference of 0.2353919 secs +Time difference of 5.098324 secs $BM.1 sigma theta.log.SVL.SE sigma.sq.matrix 1.306906 2.528162 1.708003 437.546555